Commit cb9ccdb0 authored by Xaver Hugl's avatar Xaver Hugl Committed by Vlad Zahorodnii

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

parent 871611e9
......@@ -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 {
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment