Don't check atomic property non_desktop when not using atomic mode setting
This commit is contained in:
parent
871611e9ec
commit
cb9ccdb0fd
2 changed files with 14 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue