fix(gamescope): Add Boolean for Gamescope

Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
Collecting
2026-01-05 10:36:34 +00:00
parent b5a472ced1
commit 136e04de5b

View File

@@ -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