Don't check atomic property non_desktop when not using atomic mode setting

This commit is contained in:
Xaver Hugl 2020-11-17 08:10:51 +00:00 committed by Vlad Zahorodnii
parent 871611e9ec
commit cb9ccdb0fd
2 changed files with 14 additions and 8 deletions

View file

@ -131,13 +131,15 @@ bool DrmGpu::updateOutputs()
auto it = std::find_if(m_connectors.constBegin(), m_connectors.constEnd(), [currentConnector] (DrmConnector *c) { return c->id() == currentConnector; });
if (it == m_connectors.constEnd()) {
auto c = new DrmConnector(currentConnector, m_fd);
if (m_atomicModeSetting && !c->atomicInit()) {
delete c;
continue;
}
if (c->isNonDesktop()) {
delete c;
continue;
if (m_atomicModeSetting) {
if (!c->atomicInit()) {
delete c;
continue;
}
if (c->isNonDesktop()) {
delete c;
continue;
}
}
m_connectors << c;
} else {

View file

@ -37,7 +37,11 @@ public:
bool isConnected();
bool isNonDesktop() const {
return m_props.at(static_cast<int>(PropertyIndex::NonDesktop))->value();
auto prop = m_props.at(static_cast<int>(PropertyIndex::NonDesktop));
if (!prop) {
return false;
}
return prop->value();
}
private:
QVector<uint32_t> m_encoders;