From 6d60c2a0af28afd8bde3fc41c92f759e10845221 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 16 Nov 2026 17:19:17 +0100 Subject: feat(status): a game on the Xbox turns presentation on Co-Authored-By: Claude Opus 5.5 --- shared/Status.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'shared') 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" } } -- cgit v1.2.3