mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
fix(session): show the recorded reason when a session fails to start (#2841)
* fix(session): show the recorded reason when a session fails to start The ended screen now shows any recorded start-up failure message except a plain guest exit, not only PROOT_MISSING. The graphics runtime staging and game environment publish failures now record GRAPHICS_RUNTIME_FAILED and GAME_ENVIRONMENT_FAILED with their own messages instead of looking like a guest exit. * i18n(session): translate the start failure messages --------- Co-authored-by: Tapuuk <177422350+Tapuuk@users.noreply.github.com> Co-authored-by: maxjivi05 <maxjividen@gmail.com>
This commit is contained in:
36 files changed
+96
-3
No files matched your search
@@ -3304,8 +3304,9 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
}
|
||||
}
|
||||
|
||||
private fun prootFailureHint(): EndHint? {
|
||||
if (SessionState.failureCode != "PROOT_MISSING") return null
|
||||
private fun startFailureHint(): EndHint? {
|
||||
val code = SessionState.failureCode ?: return null
|
||||
if (code == "GUEST_EXIT") return null
|
||||
val message = SessionState.failureMessage ?: return null
|
||||
return EndHint(message)
|
||||
}
|
||||
@@ -3315,7 +3316,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
}
|
||||
|
||||
private fun sessionExitHint(status: Int): EndHint? = if (status == 0) presentationFaultHint()
|
||||
else runtimeDamageHint() ?: sessionEndHint(SessionState.logFile) ?: prootFailureHint()
|
||||
else runtimeDamageHint() ?: sessionEndHint(SessionState.logFile) ?: startFailureHint()
|
||||
|
||||
private fun sessionEndHint(log: File?): EndHint? {
|
||||
presentationFaultHint()?.let { return it }
|
||||
|
||||
Reference in new issue
Block a user