aboutsummaryrefslogtreecommitdiffstats
path: root/shared/Status.qml
diff options
context:
space:
mode:
Diffstat (limited to 'shared/Status.qml')
-rw-r--r--shared/Status.qml11
1 files changed, 7 insertions, 4 deletions
diff --git a/shared/Status.qml b/shared/Status.qml
index ab45e99..727f32b 100644
--- a/shared/Status.qml
+++ b/shared/Status.qml
@@ -33,9 +33,10 @@ Singleton {
readonly property bool dnd: dndFile.value
// Set by the game detector below, on its own file so it never fights the
// manual toggle: presentation is the OR, and a game ending clears only its
- // half. A manual "on" therefore survives a game session.
- readonly property bool gaming: gamingFile.value
- readonly property bool presentation: presFile.value || gamingFile.value
+ // half. A manual "on" therefore survives a game session. status.xbox is
+ // the same for a game on the Xbox, written by deck-it's xbox module.
+ readonly property bool gaming: gamingFile.value || xboxFile.value
+ readonly property bool presentation: presFile.value || gaming
// Stored as "auto-lock disabled", so the missing-file default of off is
// the wanted default of locking on. The row inverts it for the label.
readonly property bool nolock: nolockFile.value
@@ -109,7 +110,7 @@ Singleton {
// The detector calls this every poll; a write on an unchanged value would
// still land as an atomic write and re-fire the FileView watch for nothing.
function setGaming(on) {
- if (on !== root.gaming) gamingFile.write(on);
+ if (on !== gamingFile.value) gamingFile.write(on);
}
// The timed disable re-enables itself. Runs only while a deadline is
@@ -234,4 +235,6 @@ Singleton {
ModeFile { id: nolampFile; path: root.dir + "/status.nolamp" }
// Written only by the game detector above, never by statusctl.
ModeFile { id: gamingFile; path: root.dir + "/status.gaming" }
+ // Written only by deck-it while the Xbox runs a game.
+ ModeFile { id: xboxFile; path: root.dir + "/status.xbox" }
}