mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Fix screen effects restoration on cancelled launch
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user