diff --git a/src/citron/uisettings.cpp b/src/citron/uisettings.cpp index c1b5a0d2e..1c064fbb4 100644 --- a/src/citron/uisettings.cpp +++ b/src/citron/uisettings.cpp @@ -136,4 +136,15 @@ namespace UISettings { config.value(QStringLiteral("microProfileDialogGeometry")).toByteArray(); } + bool IsGamescope() { +#ifdef __linux__ + static const bool is_gamescope = !qgetenv("GAMESCOPE_WIDTH").isEmpty() || + qgetenv("XDG_CURRENT_DESKTOP") == "gamescope" || + !qgetenv("STEAM_DECK").isEmpty(); + return is_gamescope; +#else + return false; +#endif +} + } // namespace UISettings