A drawer on Back: HUD, frame generation, on-screen controls, background, stop

Back used to background the app outright. It now opens a slim panel on the
right with the switches a player reaches for mid-game — the performance HUD,
the frame-generation picker (shared with the main screen), the on-screen
controls' mode (auto / always / never, replacing the file-only override) —
and the two things that leave the session: send it to the background, or stop
it. Back again, or a tap outside, closes it.
This commit is contained in:
The412Banner committed 2026-09-19 15:37:37 -04:00
1 parent 3582186951
commit 51303fa342
9 files changed
+260 -42

No files matched your search

@@ -82,5 +82,30 @@ object FrameGen {
return problem
}
/** Off, or an engine at 2x/3x/4x; saved on pick, then [onChanged]. */
fun showPicker(activity: android.app.Activity, onChanged: () -> Unit) {
val choices = arrayOf("Off",
"Win-FG 2×", "Win-FG 3×", "Win-FG 4×",
"LSFG 2× (needs Lossless Scaling)", "LSFG 3× (needs Lossless Scaling)", "LSFG 4× (needs Lossless Scaling)")
val current = when (engine(activity)) {
ENGINE_WINFG -> multiplier(activity) - 1
ENGINE_LSFG -> multiplier(activity) + 2
else -> 0
}
android.app.AlertDialog.Builder(activity)
.setTitle(com.steamdeck.launcher.R.string.frame_gen_title)
.setSingleChoiceItems(choices, current) { dialog, which ->
when (which) {
0 -> set(activity, ENGINE_OFF, 2)
in 1..3 -> set(activity, ENGINE_WINFG, which + 1)
else -> set(activity, ENGINE_LSFG, which - 2)
}
dialog.dismiss()
onChanged()
}
.setNeutralButton(android.R.string.ok, null)
.show()
}
private const val TAG = "FrameGen"
}