From 136e04de5b8734332c58e93a84e5a96422a06f53 Mon Sep 17 00:00:00 2001 From: Collecting Date: Mon, 5 Jan 2026 10:36:34 +0000 Subject: [PATCH] fix(gamescope): Add Boolean for Gamescope Signed-off-by: Collecting --- src/citron/uisettings.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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