mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
Fix per-game screen effects initialization
This commit is contained in:
1 parent
62d7bdc6e8
commit
a14dd3049d
2 files changed
+12
-7
No files matched your search
@@ -1352,7 +1352,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
|||||||
WaylandCompositor.nativeSetUpscaleSharpness(pct)
|
WaylandCompositor.nativeSetUpscaleSharpness(pct)
|
||||||
},
|
},
|
||||||
onEffects = { e ->
|
onEffects = { e ->
|
||||||
if (drawerOpen &&
|
if ((drawerOpen || (docked && drawerPinned)) &&
|
||||||
SessionPrefs.activeScreenEffectsProfileId(this@SessionActivity) == effectsEditorProfileId) {
|
SessionPrefs.activeScreenEffectsProfileId(this@SessionActivity) == effectsEditorProfileId) {
|
||||||
SessionPrefs.setScreenEffects(this@SessionActivity, effectsEditorProfileId, e)
|
SessionPrefs.setScreenEffects(this@SessionActivity, effectsEditorProfileId, e)
|
||||||
effects = e
|
effects = e
|
||||||
|
|||||||
@@ -371,12 +371,17 @@ class SessionService : Service() {
|
|||||||
pipTask = false
|
pipTask = false
|
||||||
SessionState.program = intent?.getStringExtra(EXTRA_PROGRAM)
|
SessionState.program = intent?.getStringExtra(EXTRA_PROGRAM)
|
||||||
SessionState.programArgs = intent?.getStringArrayExtra(EXTRA_PROGRAM_ARGS)?.toList().orEmpty()
|
SessionState.programArgs = intent?.getStringArrayExtra(EXTRA_PROGRAM_ARGS)?.toList().orEmpty()
|
||||||
SessionState.gameId = intent?.getStringExtra(EXTRA_GAME_ID)
|
|
||||||
SessionState.steamUi = intent?.getStringExtra(EXTRA_STEAM_UI)
|
SessionState.steamUi = intent?.getStringExtra(EXTRA_STEAM_UI)
|
||||||
SessionState.steamUrl = intent?.getStringExtra(EXTRA_STEAM_URL)
|
SessionState.steamUrl = intent?.getStringExtra(EXTRA_STEAM_URL)
|
||||||
|
val steamUrlGameId = SessionState.steamUrl
|
||||||
|
?.takeIf { it.startsWith(GAME_URL_PREFIX) }
|
||||||
|
?.removePrefix(GAME_URL_PREFIX)
|
||||||
|
?.takeIf(GameLaunchLink::validId)
|
||||||
|
val resolvedGameId = intent?.getStringExtra(EXTRA_GAME_ID) ?: steamUrlGameId
|
||||||
|
SessionState.gameId = resolvedGameId
|
||||||
SessionPrefs.setActiveScreenEffectsProfile(
|
SessionPrefs.setActiveScreenEffectsProfile(
|
||||||
this,
|
this,
|
||||||
SessionPrefs.screenEffectsProfileId(SessionState.mode, SessionState.gameId, SessionState.program),
|
SessionPrefs.screenEffectsProfileId(SessionState.mode, resolvedGameId, SessionState.program),
|
||||||
)
|
)
|
||||||
com.droiddeck.launcher.stores.battlenet.BattleNetClient.clearRequests(LinuxRuntime.sessionRoot(this))
|
com.droiddeck.launcher.stores.battlenet.BattleNetClient.clearRequests(LinuxRuntime.sessionRoot(this))
|
||||||
val gen = synchronized(stopLock) {
|
val gen = synchronized(stopLock) {
|
||||||
@@ -398,10 +403,10 @@ class SessionService : Service() {
|
|||||||
if (SessionPrefs.clearCachedApps(this)) clearCachedApps()
|
if (SessionPrefs.clearCachedApps(this)) clearCachedApps()
|
||||||
cancelQueuedSteamGame(clearMailbox = false)
|
cancelQueuedSteamGame(clearMailbox = false)
|
||||||
clearSteamGameMailbox()
|
clearSteamGameMailbox()
|
||||||
if (SessionState.mode == MODE_STEAM) SessionState.steamUrl
|
if (SessionState.mode == MODE_STEAM &&
|
||||||
?.takeIf { it.startsWith(GAME_URL_PREFIX) }?.let {
|
SessionState.steamUrl?.startsWith(GAME_URL_PREFIX) == true) {
|
||||||
watchGameExit(it.removePrefix(GAME_URL_PREFIX), gen, ++gameExitWatchToken)
|
resolvedGameId?.let { watchGameExit(it, gen, ++gameExitWatchToken) }
|
||||||
}
|
}
|
||||||
acquireLocks()
|
acquireLocks()
|
||||||
Thread({
|
Thread({
|
||||||
OrphanReaper.reap("session starting")
|
OrphanReaper.reap("session starting")
|
||||||
|
|||||||
Reference in new issue
Block a user