Fix screen effects restoration on cancelled launch

This commit is contained in:
EnzoDLofi committed 2026-11-13 22:16:13 -04:00
1 parent 506e7c5ba4
commit ac14738853
1 file changed
+6 -9
@@ -1536,20 +1536,17 @@ class SessionService : Service() {
val canRestore = gen == sessionGen &&
SessionState.running && !SessionState.stopRequested &&
SessionState.mode == MODE_STEAM &&
SessionState.gameId == gameId &&
SessionPrefs.activeScreenEffectsProfileId(this) == queuedProfileId
cancelQueuedSteamGame()
if (canRestore) {
val restoreGameId = if (SessionState.gameId == gameId) {
previousGameId.also { SessionState.gameId = it }
} else {
SessionState.gameId
}
val restoreProfileId =
SessionPrefs.screenEffectsProfileId(MODE_STEAM, restoreGameId, null)
SessionPrefs.setActiveScreenEffectsProfile(this, restoreProfileId)
SessionPrefs.screenEffects(this, restoreProfileId)
SessionState.gameId = previousGameId
val previousProfileId =
SessionPrefs.screenEffectsProfileId(MODE_STEAM, previousGameId, null)
SessionPrefs.setActiveScreenEffectsProfile(this, previousProfileId)
SessionPrefs.screenEffects(this, previousProfileId)
.push(SessionPrefs.upscaler(this))
}
return