summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xprivate.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/xprivate.cpp b/src/xprivate.cpp
index ce7ce8c..2f4cd55 100644
--- a/src/xprivate.cpp
+++ b/src/xprivate.cpp
@@ -1,6 +1,7 @@
#include "xprivate.h"
#include <QDebug>
+#include <QRegularExpression>
/**
* Check list of known model names that falsely report a screen size or similar
@@ -10,6 +11,18 @@ static QStringList initProjectorList()
QStringList list;
list << "AT-HDVS-RX"; // Switchbox
// TODO: Load from file
+ QFile file("/opt/openslx/beamergui/beamer.conf"); // TODO: Config option
+ if (file.open(QIODevice::ReadOnly)) {
+ QRegularExpression re("^([^=]+)=beamer$");
+ while (!file.atEnd()) {
+ QString line = file.readLine();
+ auto match = re.match(line);
+ if (match.hasMatch()) {
+ list << match.captured(1);
+ }
+ }
+ }
+ qDebug() << "Forced beamer list:" << list;
return list;
}