mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
fix(dual-screen): open the bottom-screen Dashboard in every session, not only the first (#1933)
On dual-screen handhelds the bottom-screen Dashboard only opened by itself in the first Steam session after DroidDeck started. SessionActivity.onCreate checks for a new session twice; the first block calls SessionEvents.begin(), which moves the phase to PREPARING, so the second block (which held the per-session reset of secondScreenAutoOpened / secondScreenProvisional) never ran. The reset now happens in the first block, right after begin(). Tested on a Retroid Pocket Duo: two Steam sessions in one app process, Dashboard on the bottom screen both times.
This commit is contained in:
1 parent
dbf114a0f2
commit
730b3affae
1 file changed
+3
-2
@@ -581,6 +581,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
val mode = intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM
|
||||
SessionState.programArgs = intent.getStringArrayExtra(SessionService.EXTRA_PROGRAM_ARGS)?.toList().orEmpty()
|
||||
SessionEvents.begin(this, mode, SessionPaths.label(mode, intent.getStringExtra(SessionService.EXTRA_PROGRAM)))
|
||||
// begin() moves the phase on, so the block below never runs for a new session; reset per-session flags here.
|
||||
SessionState.secondScreenAutoOpened = false
|
||||
SessionState.secondScreenProvisional = false
|
||||
}
|
||||
if (!SessionState.running && SessionState.phase in setOf(SessionPhase.IDLE, SessionPhase.FAILED)) {
|
||||
SessionState.program = intent.getStringExtra(SessionService.EXTRA_PROGRAM)
|
||||
@@ -588,8 +591,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
SessionState.steamUi = intent.getStringExtra(SessionService.EXTRA_STEAM_UI)
|
||||
SessionState.steamUrl = intent.getStringExtra(SessionService.EXTRA_STEAM_URL)
|
||||
SessionState.steamVr = intent.getBooleanExtra(EXTRA_STEAMVR, false)
|
||||
SessionState.secondScreenAutoOpened = false
|
||||
SessionState.secondScreenProvisional = false
|
||||
} else if (intent.getBooleanExtra(EXTRA_STEAMVR, false) && SessionState.mode == SessionService.MODE_STEAM) {
|
||||
SessionState.steamVr = true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user