Commit 9b8970a
committed
sessions: end same-display session when the launcher UI returns to foreground
Returning to Argosy left the play session alive for a 15s UsageStats grace
that nothing re-checked: gamepad input was swallowed by the dead-game
forward branch, the new task-removed release was blocked by the stale
flag, and the bottom screen kept the in-game panel until a second resume.
cleanupStaleSession now ends any session on the launcher's own display on
every resume and clears SessionStateStore synchronously so the companion
flips immediately; only cross-display sessions (swapped roles, per-game
display target) survive, which also removes the UsageStats dependency and
the swapped-mode resume clearing bug. Input dispatch defers to the
emulator only when it runs on a different display. onTaskRemoved checks
the in-memory session via new hasLiveSession instead of the prefs flag
that lags behind save sync. The companion respawn check no longer honors
a persisted session when the process restarted, it is an orphan by
definition. requiresEmulatorKill emulators get force-stopped at launch
when no session is tracked since the lingering-session kill trigger is
gone.1 parent aa7d55a commit 9b8970a
5 files changed
Lines changed: 38 additions & 21 deletions
File tree
- app/src/main/kotlin/com/nendo/argosy
- hardware
- ui/screens/common
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
| |||
417 | 415 | | |
418 | 416 | | |
419 | 417 | | |
420 | | - | |
| 418 | + | |
421 | 419 | | |
422 | 420 | | |
423 | 421 | | |
| |||
488 | 486 | | |
489 | 487 | | |
490 | 488 | | |
491 | | - | |
| 489 | + | |
492 | 490 | | |
493 | 491 | | |
494 | 492 | | |
| |||
587 | 585 | | |
588 | 586 | | |
589 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
590 | 595 | | |
591 | 596 | | |
592 | 597 | | |
| |||
601 | 606 | | |
602 | 607 | | |
603 | 608 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | 609 | | |
612 | 610 | | |
613 | 611 | | |
| |||
621 | 619 | | |
622 | 620 | | |
623 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
624 | 628 | | |
625 | 629 | | |
626 | 630 | | |
627 | 631 | | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
633 | 638 | | |
634 | 639 | | |
| 640 | + | |
635 | 641 | | |
636 | 642 | | |
637 | 643 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | | - | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
| 123 | + | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
240 | 247 | | |
241 | 248 | | |
242 | 249 | | |
| |||
0 commit comments