From b8188a46a9f41e755f512a634018332a0f4885a0 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 9 Feb 2020 12:39:42 -0800 Subject: [PATCH] Display a friendly warning when running without a KMS driver --- app/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 596476d0..92db0540 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -10,6 +10,7 @@ #include #include #include +#include // Don't let SDL hook our main function, since Qt is already // doing the same thing. This needs to be before any headers @@ -301,10 +302,17 @@ int main(int argc, char *argv[]) #endif } else { +#ifndef STEAM_LINK 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"); + + if (!QFile("/dev/dri").exists()) { + qWarning() << "Unable to find a KMSDRM display device!"; + qWarning() << "On Raspberry Pi 2 and 3, you must enable the fake or full KMS driver in raspi-config to use Moonlight outside of the GUI environment."; + } } +#endif } // This avoids using the default keychain for SSL, which may cause