mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-31 06:43:35 +00:00
fix(gamescope): Add Boolean for Gamescope
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user