mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Preserve screen effects profile when game restarts
This commit is contained in:
1 parent
24a88c559e
commit
afc44f03b8
1 file changed
+8
-1
@@ -1637,13 +1637,20 @@ class SessionService : Service() {
|
||||
return@postDelayed
|
||||
}
|
||||
|
||||
if (steamGameRunning(gameId)) {
|
||||
Log.i(TAG, "game $gameId is running again; restarting its exit watcher")
|
||||
watchGameExit(gameId, gen, token)
|
||||
return@postDelayed
|
||||
}
|
||||
|
||||
if (SteamGameProcess.running()) {
|
||||
clearActiveScreenEffectsProfile(gameId, gen, token)
|
||||
Log.i(TAG, "another Steam game is still running after $gameId; checking again")
|
||||
returnAfterGame(gameId, gen, token)
|
||||
return@postDelayed
|
||||
}
|
||||
|
||||
clearActiveScreenEffectsProfile(gameId, gen, token)
|
||||
|
||||
val written = runCatching { File(LinuxRuntime.sessionRoot(this), "steam-stop").writeText("") }
|
||||
.onFailure { Log.w(TAG, "could not ask the client to exit after game $gameId", it) }.isSuccess
|
||||
if (!written) return@postDelayed
|
||||
|
||||
Reference in new issue
Block a user