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

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
The in-session drawer, opened with Back. A tap on the dimmed area or Back again closes it.
Small on purpose: the switches a player reaches for mid-game, nothing that needs the main
screen.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_scrim"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#66000000"
android:clickable="true"
android:focusable="true">
<LinearLayout
android:id="@+id/drawer_panel"
android:layout_width="264dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:orientation="vertical"
android:background="#F2151A22"
android:clickable="true"
android:focusable="true"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textColor="#FFFFFFFF"
android:textSize="16sp"
android:layout_marginBottom="12dp" />
<Switch
android:id="@+id/drawer_hud"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="40dp"
android:text="@string/drawer_hud"
android:textColor="#FFDDDDDD"
android:textSize="13sp" />
<Button
android:id="@+id/drawer_frame_gen"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:minHeight="40dp"
android:textSize="13sp" />
<Button
android:id="@+id/drawer_osc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:minHeight="40dp"
android:textSize="13sp" />
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<Button
android:id="@+id/drawer_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="40dp"
android:textSize="13sp"
android:text="@string/drawer_background" />
<Button
android:id="@+id/drawer_stop"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:minHeight="40dp"
android:textSize="13sp"
android:textColor="#FFFF8A80"
android:text="@string/stop_session" />
</LinearLayout>
</FrameLayout>
+6
View File
@@ -36,6 +36,12 @@
<string name="frame_gen">Frame generation: %1$s</string>
<string name="frame_gen_title">Frame generation</string>
<string name="frame_gen_help">Extra frames are generated between the real ones on the way to the screen, so a game running at 30 fps looks like 60. Win-FG is built in. LSFG uses the shaders from your own copy of Lossless Scaling — install it from the Steam client in this app first. Takes effect immediately, even mid-game.</string>
<string name="drawer_hud">Performance HUD</string>
<string name="drawer_osc">On-screen controls: %1$s</string>
<string name="drawer_background">Send to background</string>
<string name="osc_auto">auto</string>
<string name="osc_always">always</string>
<string name="osc_never">never</string>
<string name="credits_line">by The412Banner and maxjivi05 · credits</string>
<string name="credits_title">Credits</string>
<string name="credits_body">SteamDeck\n\nThe412Banner — the app, the Wayland compositor, the runtime and the Steam session.\n\nmaxjivi05 (Max) — the gamescope runtime this is built on: the proot session, the session shim, the fake-evdev interposer and the controller work, from WinNative.\n\nGPL-3.0. Valve, Steam, Steam Deck and Proton are trademarks of Valve Corporation; this project is not affiliated with Valve. gamescope, Mesa, Turnip, Xwayland, PulseAudio, proot and Arch Linux ARM are their authors\' own.</string>