From aff2ed22b99e41828490d83b9bdc7c0f2b6a3f6e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 8 Feb 2020 21:37:17 -0800 Subject: [PATCH] Use EGLFS platform plugin if X and Wayland aren't detected --- app/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 3f4a5c0e..27868d69 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -300,6 +300,12 @@ int main(int argc, char *argv[]) QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endif } + else { + if (qgetenv("QT_QPA_PLATFORM").isEmpty()) { + qInfo() << "Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this."; + qputenv("QT_QPA_PLATFORM", "eglfs"); + } + } // This avoids using the default keychain for SSL, which may cause // password prompts on macOS.