Commit Graph
2523 Commits
Author SHA1 Message Date
MaxsTechReview d6496b2f96 feat(addons): install the CurseForge app and update addons per game (#2986)
* feat(addons): install the CurseForge app and update addons per game

The Addons tab installs the official CurseForge Linux app from its own
update feed, checks it against the feed's SHA-512, shows its version,
offers updates and removes it with the components delete button.

Installed addons show their .toc version and are checked against
WoWInterface by X-WoWI-ID or the recorded source of addons installed
from the Download window; Update replaces them in place.

The CurseForge web search chip is replaced by the app.

* fix(addons): address review on update ordering, flavor filter, origins lock and failed checks

* fix(addons): compact scrollable addon browser with list rows

* fix(addons): compare release times as instants and replace the sources file atomically

* fix(addons): open the addon browser at the top of the list

* Keep the addon browser's search focus and installed version in sync

* Track the search field's own focus in the addon browser

* Key the installed addon version by install target

* Install rar and 7z addon archives
2026-11-21 23:47:58 -05:00
MaxsTechReview 3577073ab9 fix(input): move and resize the on-screen D-pad as one control, per-control button size and sizes above 100% (#2996)
* fix(input): move and resize the D-pad as one control, per-control button size and sizes above 100%

* fix(input): controller art for copied layouts, keep the minimum size when shrinking the D-pad

Copies and per-game versions of the on-screen gamepad now draw the same controller art and placement as the original, and resizing the D-pad from a corner or the per-control slider keeps every arrow at a usable size.

* Keep other controls' moves when undoing a repeated resize
2026-11-21 23:47:35 -05:00
Kurt Himebauch a2587f4f20 fix(display): preserve padded layer buffer layouts (#2985)
* fix(display): preserve padded layer buffer layouts

* fix(display): fall back when layer allocation fails

* fix(display): write linear targets at their row pitch
2026-11-21 23:40:11 -05:00
Kurt Himebauch b2687701c1 build: run the local macOS build natively, with no emulation (#2999)
build: make the local macOS build run natively, with no emulation

On an arm64 Mac the x86/i386 session preloads were built in a linux/amd64
container under emulation, and the Rockstar launcher failed to link against
Homebrew's SJLJ i686 mingw. Both now build on the host's own architecture.

- build_local.sh: on arm64 build the x86 preloads in a native arm64 Debian
  bullseye container with the x86_64/i686 cross toolchains (glibc 2.31, as
  before); x86 hosts keep the native gcc-multilib path.
- build-x86-preloads.sh: X86_CROSS=1 selects the cross toolchains.
- rockstar-launcher/build-container.sh: build the launcher in a native
  Ubuntu container with a DWARF2 mingw, used on macOS only.
- vr/build.sh: stop aborting silently when ANDROID_NDK_HOME names an NDK
  that is not installed.
- build_local.sh: expand the empty stores_check array safely on bash 3.2 so
  the script reaches its signing step.
2026-11-21 22:51:27 -05:00
MaxsTechReviewandKurt Himebauch 378175c6ac feat(input): controller-specific on-screen controls with editor, rotation and tablet fixes (#2988)
* feat(input): restore controller-specific overlay designs

* fix(input): restore portrait controller layouts

* fix(input): fix duplicates, rotation and tablet placement in the controller overlays

- Hide the below-game controls while the layout editor is open, and give the
  editor the same cutout insets and optional Steam controls as the game view,
  so the editor never shows a second copy of a control.
- Keep a separate portrait frame for layouts edited in portrait. A layout
  edited in one orientation keeps the stock kit positions in the other instead
  of being stretched across.
- Anchor the overlay to the bottom of the screen and cap the portrait panel's
  physical size, so tablets keep the controls in the lower half.
- Put L2/L1 and R1/R2 side by side in every kit.
- List deleted stock controls in the editor's Add dialog so they can be
  restored, and keep removed rear buttons and trackpads removed.

* fix(input): scale edited overlay layouts around the controller artwork positions

* fix(input): keep stock landscape controls, color setting, keyboard action and displayed frame edits consistent

* fix(input): draw the layout editor with the kit artwork at the size it will be saved

The editor placed its controls in onSizeChanged, which runs during layout, so
the preview canvas was rebuilt or remeasured too late: new controls were laid
out at 0x0 and existing ones kept stale sizes, losing the kit D-pad artwork.
Placement now happens in onMeasure, before the canvas measures its children.

The editor preview used the saved button size instead of the slider value, so
the slider showed a different layout from the one Done saved.

D-pad pieces that joined or left the kit cross were never redrawn, so moving
one piece hid all four.

* fix(input): keep portrait rear buttons and trackpads where they were saved

A portrait save stores the rear buttons and trackpads only in the rotated
frame, but loading that frame only moved controls that already existed in the
main frame, so they were regenerated at the screen edges.

* fix(input): adopt the displayed portrait frame for layouts edited only in landscape

Button size and reset positions now switch to the frame on screen whenever the edited layout's
orientation differs from the editor, not only when a rotated frame exists, so a portrait change
is saved as the portrait frame instead of overwriting the landscape edits. The tools panel stays
open while that happens.

* fix(input): keep a separate button size for the rotated frame

* fix(input): take the shown frame's button size whenever editing switches orientation

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-21 20:11:21 -05:00
MaxsTechReview 183cbd9351 fix(preload): start apps that check for a single thread and stop the first-call allocation hang (#2995)
* fix(preload): look up the native glibc symbol version first so wrapped calls never allocate

On x86 the first dlvsym lookup asked for GLIBC_2.17, which only exists on arm64. The failed lookup makes glibc allocate, which deadlocks when the first wrapped call happens inside a program's own allocator setup. Each architecture now asks for its base version first.

* fix(zram): start the page-out worker per request instead of keeping a thread in every process

Every process that loaded the session preload carried a resident zr-worker thread from its constructor on. Programs that check they are single-threaded before forking or before unshare(CLONE_NEWUSER) failed, for example Chromium's zygote, which could not start its GPU process.

The signal handler now starts the worker with a raw clone on a stack the preload maps itself. The worker makes only raw system calls and exits when no request is left, so starting it from the handler is safe and idle processes stay single-threaded. When the worker cannot be started, the process trims inline in small steps as before.

* fix(preload): start the page-out worker with the same clone flags as a thread

Programs that filter clone to the flag set threads use, as browser
sandboxes do, now accept the worker. The kernel clears the stack-busy
word and wakes waiters when the worker exits.

* fix(preload): page out inline in single-threaded and self-sandboxed processes

A process with one thread may be about to check that it is single-threaded
before fork or unshare, and a process that added a seccomp filter after it
started may trap system calls into its own handler. Neither gets a worker
thread now; both trim inline in small steps as before.

* fix(preload): check the signalled thread's own seccomp filters before starting the worker

Read Seccomp_filters from /proc/thread-self/status so a thread that installed its own filter
without TSYNC trims inline instead of calling clone under that filter, and fall back to the
inline path when the signal mask cannot be changed.

* test(preload): start parked threads with SIGURG already blocked

* test(preload): count only page-out workers when checking for leftover threads
2026-11-21 20:11:18 -05:00
Kurt Himebauch 6af598b25e feat(launcher): tick haptics for controller navigation (#2993)
* feat(launcher): tick haptics for controller navigation, off for touch

* docs: regenerate settings map for controller haptics

* fix(launcher): tick for hat and stick navigation, which arrive as joystick-source keys

* fix(launcher): tick before the Components tab consumes L1/R1
2026-11-21 16:31:58 -05:00
MaxsTechReview 088c8ff1cf fix(battlenet): follow the selected FEX instead of pinning an old build (#2987)
* fix(battlenet): follow the selected FEX instead of pinning a d2rfix build

The Battle.net prefix forced the newest FEXCore d2rfix package from the Nightlies listing, which stopped updating. Its fixes are in the bundled and nightly FEX, so the prefix now uses whatever FEX is selected. Existing d2rfix selections for the Battle.net profile are cleared once; any other choice is kept. The DXVK memory cap and Start without Steam defaults are now applied when a session starts.

* fix(battlenet): import the legacy plugin state before unpinning the Battle.net FEX
2026-11-21 15:31:18 -05:00
Kurt Himebauch 31dd8f9987 feat(session): arrange and hide in-session menu pages, round pinned end-session button (#2989)
* feat(session): arrange and hide the in-session menu pages

* fix(session): the end-session button is a true circle pinned to the right of the menu header

* fix(session): arrange-pages drag reads the current list; reset reloads the page layout even if the activity was recreated

* fix(session): Back leaves Arrange pages first; UI zoo previews don't save page layout

* fix(session): Back on a grabbed page row restores its order before anything else
2026-11-21 15:25:45 -05:00
FX1922 e06ca23f66 feat(session): add an Avoid notch toggle to the Steam display options (#2983)
## Summary

Adds an **Avoid notch** toggle to the Steam Display tab (under 16:9 game
fit). When it is on, the session is laid out inside the display cutout's
safe area, so the camera notch no longer covers part of the picture.

## Why

Sessions draw edge to edge under the notch. In landscape the notch cuts
into the side of the picture, and in portrait it sits on top of the
picture's upper edge. Today the only workaround is picking a smaller
custom resolution so the notch lands in the black bars. With this toggle
any resolution can be used, including Match screen, and the picture
stays clear of the notch.

## Behavior

- Off by default, so existing sessions are unchanged.
- Shown only in the Steam mode Display tab.
- The safe-area insets (left, top, right, bottom) are read from the
window's display cutout and applied as padding to the session root. The
picture, on-screen controls, HUD and overlays all stay inside it, so
cursor and touch mapping are unaffected.
- Read when the session starts and again when returning to it, and
re-applied when the window insets or configuration change (rotation,
fold, etc.), so toggling it from the launcher takes effect when you
return to the session.
- Not applied in picture-in-picture, glasses, second-screen or cardboard
output. The padding is cleared there.
- Devices without a cutout, or Android below 9 (API 28), are unaffected
because there are no cutout insets.
- Included in the settings reset and in the device report.

## Changes

- `SessionPrefs`: `avoidNotch` / `setAvoidNotch`, added to the reset key
list
- `ModeSettings` / `ModeSettingsActions` and the Display tab: new toggle
row
- `FrontEndActivity`: state, load and save for the toggle
- `SessionActivity`: `applyNotchInset()` driven by the decor view's
window insets, `readPrefs()` and configuration changes
- `DeviceReport`: logs the setting
- Strings: `display_avoid_notch` and `display_avoid_notch_hint` in all
33 locale files
- Test: `AvoidNotchPrefsTest` (default off, persists, reset turns it
off)

## Testing

- Unit tests added for the preference and the settings reset.
2026-11-21 18:25:32 +03:00
FX192 e57bc43f6a fix(session): map every activity-level touch into the surface space 2026-11-21 17:55:36 +03:00
FX192 3962b3e27f fix(session): convert activity-level mouse touches once, not control-forwarded ones 2026-11-21 17:42:14 +03:00
FX192 dc6b7f29cf fix(session): map activity-level mouse touches into the surface space 2026-11-21 17:34:36 +03:00
FX192 ca29850d04 fix(session): keep mouse, pen and unfolded layout correct with the notch inset
Map activity-level mouse and pen events into the surface's space, size the unfolded layout from the padded content area, re-evaluate the inset when the output moves to glasses, the bottom screen or cardboard, and use a clearer Arabic label.
2026-11-21 17:25:19 +03:00
FX192 c0cc3b46a0 feat(session): add an Avoid notch toggle to the Steam display options
Keeps the Steam session picture, controls and overlays inside the display cutout's safe area so the notch no longer covers part of the image, in landscape or portrait. Off by default.
2026-11-21 17:08:27 +03:00
Kurt HimebauchandK11MCH1 64b7339da9 feat(input): restyle Steam Deck buttons (#2966)
* feat(input): restyle Steam Deck buttons

* feat(input): add Steam overlay options

* fix(input): align floating overlay previews

* fix(input): polish floating Steam trackpads

* fix(input): restore overlay options on startup

* fix(input): restore original Steam Deck artwork

* fix(input): restore Steam Deck overlay geometry

* fix(input): keep the Steam Deck shortcut row apart on small screens

The Steam pill sits right of the keyboard by a density-based margin while
Select and Start sit at unit-scaled offsets from the middle, so on a small,
dense surface (800x450 at xxxhdpi) the Steam pill covered Select. Lay out
Steam, Select, Start and Quick Access left to right with an 8 dp gap.

* fix(input): fit the Steam Deck shortcut row inside the safe area

Clamping each pill on its own after spacing could move Quick Access back
onto Start when a cutout inset narrows the right side. Fit the keyboard,
Steam, Select, Start and Quick Access as one row: push each right past its
neighbour, pull the row back inside the right edge, and shrink the 8 dp gap
only when the row would not fit otherwise.

---------

Co-authored-by: K11MCH1 <81425424+K11MCH1@users.noreply.github.com>
2026-11-21 17:42:45 +09:00
MaxsTechReview 4349563fd1 feat(display): zero-copy presentation toggle and compositor display buffers (#2905)
* feat(display): zero-copy presentation toggle and compositor display buffers

Adds a Zero-copy presentation switch under Steam Settings, Display,
Session Display (on by default), and a display-buffer allocator in the
compositor: a Vulkan driver that states displayBuffers asks it for the
memory of the images it exports, so frames presented through the nested
compositor are gralloc buffers that go on the display layer without a
copy. Compressed buffers are offered only where the device's allocator
matches the layout the drivers render to; everything else stays on the
copy path.

The private buffer protocol is renamed to droiddeck-ahb-v1.

* fix(display): zero-copy frames keep the full refresh rate

Two buffers set on the game layer inside one refresh replaced each other, and a frame that slipped into the next refresh made the compositor hold and drop the on-time frame behind it. The layer now queues buffers, and a refresh takes a second frame when the one before it took none. The pacing tool no longer counts its dump time in the frame rate.

* Keep cropped scenes on the display layer and pace layer frames evenly

Accept any in-bounds source crop for the display layer and map the draw
geometry the same way the copy path does. Time layer frames against the
display's frame timeline, and when the game's rate is a steady whole
fraction of the refresh rate show each frame a fixed number of refreshes
after the last so uneven arrivals no longer reach the screen.

* List zero-copy in the settings map

* Hold display buffers until the display releases them

A buffer the game or gamescope rendered straight into went back to its
client as soon as the next one was latched, with the display's release
fence attached to the dma-buf. The KGSL driver does not wait on that
fence, so the client could draw into a buffer the panel was still
reading. Display buffers now wait for the release fence before the
release event, and gamescope composites only into output images the
host has released.

* Keep the game picture copy-free when an overlay has no display layer

When the display cannot give a second layer of its own to an overlay,
the compositor tells gamescope how many planes it can show directly.
gamescope then composes its overlays into the game picture, which still
reaches the display without a copy.

* feat(session): the panel refresh rate follows the session's frame rate

The session learns the panel's refresh rates and reports the refresh rate and
frame rate it wants. The panel moves to the highest rate the frame rate divides
evenly, frame generation counts at its output rate, and a panel whose rate the
system holds offers only that rate.

* feat(session): the panel follows a frame rate the game holds on its own

The compositor reports the game's frame rate once a second. A rate that
holds for three seconds and divides a panel rate becomes the content
rate when neither the app's limit nor the session's limiter is setting
the pace, so a game capped in its own settings gets a panel rate its
frames divide into. A rate that was dropped has to hold twice as long
before it is used again.

* Show generated frames on the game's display layer

With frame generation on, the game's own frames stay on their display
layer untouched and each generated frame is placed on the same layer
between them, timed across the game's frame interval. The compositor
pass is kept when effects, HDR routing or a cursor need it, or when the
panel cannot show the multiplied rate.

* Keep scaling, generated frames and HDR on the display layer

A scaler or frame generation with zero-copy on now draws once into the
display layer instead of falling back to the copied surface. HDR output
goes to the layer when the panel supports it; on a panel without HDR the
picture is tone-mapped on the same path, and the toggle is labelled to
match what the panel can do.

* Spread a frame limit the refresh rate does not divide evenly across refreshes

* Cover the spare-tick and panel-rate paths in the compositor source tests

* Pin the gamescope build with the display-plane, release, refresh and limiter patches

* Give the layer and terminal-caller harnesses the black fill state they compile against

* feat(display): switch HDR during a session without restarting the app

The compositor now offers HDR whenever the device can present it, and the
HDR setting only decides whether the session uses it. Both HDR switches set
gamescope's hdr_enabled, the compositor's HDR output and zero-copy for the
running session. gamescope patch 0139 lets hdr_enabled change after start.
The 'Restart the app to apply.' hint is removed from every locale.

* Remake the output images in the new format when HDR is switched during a session

* Pin the gamescope build that switches HDR during a session

* Apply a saved HDR opt-out at session start and keep HDR retries with their session

* Serialise the HDR output switch with the gate opening

* feat(display): keep the client's HDR setting and the session's in step

The session publishes its HDR state with the other device controls and the
client helper applies it to the client's own display setting. A change made in
the client is reported back and goes through the same switch the drawer and
Session Display use, so all three always show one value.

* fix(desktop): keep the display-buffer socket when the runtime directory is cleared

The desktop launcher removed everything in the runtime directory except the
compositor's Wayland socket, which took the display-buffer socket with it, so
no desktop program could ask for display buffers and every frame was copied.

* fix(display): the client's HDR setting follows the session in every client mode

The bridge only ran when a variable nothing sets was present, so the client's
HDR setting and the session's never met. It now runs whenever the session
publishes an HDR state, and a client that has no such setting is asked again
only every ten seconds.

* fix(display): harden display-buffer hand-off, layer fallbacks and HDR sync

- Stop closing a buffer handle's descriptor the allocator still owns, and free an allocation whose reply could not be sent.
- Rebuild the advertised buffer formats when zero-copy is switched during a session.
- Fall back to the copy path when a layer buffer cannot be allocated, and hide the game layer when it is skipped for a frame.
- Keep a release fence that has not signalled instead of rendering into a buffer the display still reads.
- Ignore a refresh-target reset from a client that does not own the target.
- Restart the content-rate measurement after a pause, clear it when the game stops, and lengthen engagement only for a rate that was released before.
- Compare colour conversions by their values, and read padded cursor buffers at their row width.
- Use the running session's mode for the HDR and zero-copy settings, probe the display before screen effects are pushed, retry a held panel mode, and ignore callbacks after the activity is destroyed.
- Write a newer HDR value while an earlier write is settling, and reapply the value after the bridge is reinstalled.
2026-11-21 00:26:50 -05:00
Kurt Himebauch f29f72d5d9 fix(input): restore Steam controller reattach (#2963) 2026-11-20 20:17:52 -05:00
K11MCH1andMaxsTechReview 367151be2c fix(epic): start parent-checking Epic titles under an EpicGamesLauncher.exe stand-in and stage their Rockstar SDK (#2932)
* fix(epic): start Epic titles that check their parent under an EpicGamesLauncher.exe stand-in

Rockstar's launcher only accepts an Epic copy of GTA V when a process
named EpicGamesLauncher.exe started it. DroidDeck's Epic client is a
Linux program, so the launcher logged "Epic Games Launcher not detected
as parent process", failed to relaunch through Epic and showed the game
as unowned.

- tools/epic-launcher: a small Windows EpicGamesLauncher.exe that starts
  the game with the rest of its own command line, unchanged, waits for
  it and returns its exit code. It ships as the epic add-on pack.
- The Epic .droiddeck-launch.bat runs the game through it for Epic
  titles known to need it (GTA V, GTA V Enhanced, RDR2, RDR, GTA SA DE,
  Returnal, Phantom Blade: Executioners), or for any Epic game whose
  per-game environment sets DD_EPIC_PARENT=1; DD_EPIC_PARENT=0 turns it
  off. Those titles also start without Steam's SteamAppId. Without the
  staged stand-in the game starts directly, as before.
- Steam launch options now reach Epic games (%*).
- The launch hook fetches the pack when such a title finds it missing.
- Rockstar's launcher found no Social Club SDK in the prefix and ran
  Social-Club-Setup.exe /silent, which never exits under Wine. For Epic
  titles that carry a Rockstar SDK installer, the hook now extracts the
  SDK from the launcher's own Redistributables copy (the version the
  launcher compares against) or, before the launcher is installed, from
  the game's copy, and registers it. It re-extracts when that installer
  changes and leaves the Rockstar Games Launcher key alone, so PlayGTAV
  still installs the launcher on first start.

* fix(epic): fetch the parent stand-in exactly when the game will use it; keep Cargo output out of source digests

The launch hook runs before droiddeck-game-env applies per-game
variables, so it now resolves DD_EPIC_PARENT through
droiddeck-game-env's own apply_config and game_id: an unlisted title
with DD_EPIC_PARENT=1 fetches the pack, a listed title with
DD_EPIC_PARENT=0 no longer waits for it.

runtime_inputs no longer hashes the target directory beside a Cargo.toml
under its source paths, so a local cargo build of a Windows helper does
not fail verify(). tools/epic-launcher gets the same .gitignore as the
other helpers.

* fix(epic): a DD_EPIC_PARENT in the game's sidecar env decides the stand-in fetch too

The .bat sets the sidecar's env before it reads DD_EPIC_PARENT, so that
value overrides the game environment there; the launch hook now gives it
the same precedence when deciding whether to fetch the pack.

* test(epic): keep an inherited DD_EPIC_PARENT out of the launch hook tests

---------

Co-authored-by: MaxsTechReview <maxjividen@gmail.com>
2026-11-21 09:56:31 +09:00
Kurt Himebauch 9925873764 revert(input): restore pre-overhaul controls (#2958) 2026-11-20 19:43:09 -05:00
Kurt Himebauch 33761c30ab fix(input): choosing the Gamepad layout in Steam mode keeps its gamepad actions (#2954)
Choosing a layout from the layout menu took the first actions saved for it.
Desktop and Steam mode both draw the stock Gamepad, and Desktop's actions
(stick moves the pointer, face buttons click and press Enter and Esc,
D-pad sends arrow keys) could come first, so Steam mode's on-screen pad
became a mouse and keyboard. A choice now takes the mode's own actions,
or any the other mode doesn't use, and a Steam-mode selection already
holding Desktop's actions is dropped on upgrade.
2026-11-20 15:31:42 -05:00
Kurt Himebauch 089c18b49d fix(input): keep custom layouts active on upgrade (#2950) 2026-11-20 14:44:46 -05:00
Kurt Himebauch cb8e70b940 fix(input): restore Steam and Quick Access shortcuts (#2948) 2026-11-20 14:42:52 -05:00
The412BannerandKurt Himebauch 3c0d25d83b fix(display): read linear client frames at their row pitch when the driver has no explicit modifier layouts (#2927)
* fix(display): read linear client frames at their row pitch when the driver has no explicit modifier layouts

* fix(display): keep row-pitch copied client frames eligible for layer presentation

* fix(display): order the readback layout change after the staging copy

* fix(display): skip the modifier import query when the driver lacks VK_EXT_image_drm_format_modifier

* test(display): the compositor's source-extracting tests follow the linear dma-buf helpers

vkp_image_destroy now frees through destroy_image_objects, render_impl stages
linear dma-bufs and the external-image release asks foreign_image; the two
tests that compile these functions out of vk_present.c extract or stub them,
with the image's new buffer fields in their fakes.

---------

Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
2026-11-20 14:42:44 -05:00
Kurt Himebauch 6f45b5347d fix(input): the layout editor draws controls at their real size in portrait (#2949)
The editor is a dialog that starts at the default dialog size and is then
stretched to the full screen, so its preview could be laid out at a size it
was never measured at. Controls took their size from the earlier pass and
their position from the new one: in portrait, pills came out several times
taller and round buttons slid down. Each control is now sized from where the
canvas actually lays it out.
2026-11-20 13:57:12 -05:00
Kurt Himebauch a3e8b44145 fix(input): Remote Play connects again with the virtual pads present (#2946)
Since #1593 every process except the Steam client gets DroidDeck's udev
answers through dlsym. Steam's Remote Play client, streaming_client, is
an SDL3 program: for each input node it treats as a joystick, SDL3 asks
udev_device_get_driver for the device that udev_device_new_from_devnum
returned. The preload answered new_from_devnum with its own handle for a
virtual pad but did not answer get_driver, so the real libudev read the
handle as its own and streaming_client crashed before the stream opened.
It reaches that call whenever it can stat a pad node: the Xbox 360 pad,
Steam's own uinput gamepads, and since #2033 the pads it reads.

streaming_client now keeps the real libudev like the Steam client, and a
virtual pad answers get_driver with no driver, so other SDL3 programs no
longer crash on it.
2026-11-20 13:19:12 -05:00
Kurt Himebauch 0f37154933 fix(input): saved layouts keep their shape on a rotated screen, sticks aren't cut off and old gamepads are kept (#2945)
* fix(input): saved layouts keep their shape on a rotated screen, sticks aren't cut off and old gamepads are kept

- A layout shown on a screen much taller or wider than it was saved for is
  placed as one block (at the bottom in portrait) instead of anchoring each
  control by its own third, which tore clusters such as the face buttons apart
  in portrait and in the editor.
- A floating stick's base is drawn whole inside the overlay when the thumb
  lands near an edge; input still centres on the touch.
- The migration that makes old-editor gamepads follow the kit again also keeps
  a copy of each one that had kit positions, as "<name> (old layout)" with its
  actions, so players can choose their old layout again.

* fix(input): the old-layout copy keeps only actions it can use, fits the library's limits and leaves same-orientation screens alone

- Actions for kit buttons the old gamepad never placed stay on the kit-following
  gamepad and are dropped from the copy, which otherwise failed validation and
  stopped the library from loading.
- When the copy and its actions don't fit the layout, action or saved-size
  limits, the gamepad keeps its own positions instead.
- Block placement only applies when the screen and the layout differ in
  orientation; a 4:3 layout on a wide landscape screen keeps edge anchoring.
2026-11-20 13:19:08 -05:00
Kurt Himebauch 42133bec0b fix(input): the Xbox and PS buttons move to the bottom row of the floating gamepad (#2944)
The Steam kits keep their Steam and Quick Access buttons on the bottom row,
and Start and Select moved there too, but the Xbox kit's Guide button still
sat at the top centre of the screen and the PlayStation kits' PS button over
the middle of the game. Both now sit between Select and Start, where the real
pads have them, centred on the safe area like Select and Start.
2026-11-20 13:05:26 -05:00
Kurt Himebauch d7f43c26cd fix(input): Steam finds a DualShock or DualSense chosen mid-session (#2942)
* fix(input): Steam finds a DualShock or DualSense chosen mid-session

Android lets an app open a uevent netlink socket but not join its multicast
groups, and libudev joins none when no udev daemon runs, so the udev
monitors Steam's SDL opens heard nothing and the pad switch's add and remove
events reached no one. SDL only noticed a new PlayStation pad when the old
one happened to fail a read. A monitor left without a subscription is now
swapped for the session's stand-in under the same descriptor, so it
receives the injected events.

* test(preload): stub the udev monitor bind hook in the CDP guard build
2026-11-20 12:44:52 -05:00
Kurt Himebauch d5c83eae15 feat(input): describe on-screen layout choices, scope per-game layouts and delete unused ones (#2939)
* feat(input): describe on-screen layout choices, scope per-game layouts and delete unused ones

- The layout menu says what each choice is: "DroidDeck controls" work in
  every game and are edited here; "Steam touch controls" are each game's
  controls from Steam, for Steam games only.
- Layouts made with "+ New for <game>" (or "Just this game") are listed
  only for that game, marked "Just for <game>". Older ones are recognised
  by carrying the name of the game that draws them.
- Saved layouts nothing uses get a delete button in the menu. Deleting one
  also removes a profile that still uses it but can no longer be chosen,
  such as copies made by the old profile screen.
- A game set to Steam touch controls that runs without Steam shows a note
  under Layout instead of silently using the default.

* fix(input): a layout the built-in profile still lists can be deleted once another is chosen

Applying a layout used to write it into the Game profile; choosing another
now goes on top, so the profile's part is no longer drawn. Only parts a mode
actually draws count as in use, and deleting points the built-in profile
back at the stock layout.
2026-11-20 11:54:59 -05:00
Kurt Himebauch 83dc5f37e9 fix(session): launching the running game again resumes it instead of asking Steam twice (#2940)
* fix(session): launching the running game again resumes it instead of asking Steam twice

A front end that resumes a suspended player by launching the same game again
(Cocoon 3.07 does) made DroidDeck queue the game for Steam a second time,
and Steam answered with "An error occurred while launching this game: Game
already running" over the game.

queueSteamGame now resumes the session and returns when the requested game is
the current one and its process is running. A different game, or one that has
exited, still goes to Steam as before.

* fix(session): a relaunch during a pending freeze resumes too, and both game ID forms count as the same game
2026-11-20 11:40:17 -05:00
Kurt Himebauch d0022a35f9 fix(session): remove the keep-top guard from other displays (#2937)
* fix(session): remove the keep-top guard from other displays

#2763 put a transparent KeepTopActivity on every other display while a
session was on top, so lmkd killing that display's home could not move focus
off the session. A/B on a 12 GB AYN Thor (Android 13) and a Retroid Pocket
Duo (Android 16) found no case where it kept a session alive: with steady
pressure the bottom home (stock launcher or Cocoon) was killed up to 400
times per run without taking focus, and a burst big enough to matter makes
lmkd kill the session at adj 0 with or without the guard.

Its side effects were real:
- Android's ActivityRecordInputSink made the bottom screen ignore touch
  (worked around in #2910 by stepping aside on touch).
- Cocoon tracks each display's top activity, so it could not suspend or
  resume DroidDeck cleanly.
- The Thor's Game Assistant gives every app with an activity on top of the
  bottom display that display's volume, so DroidDeck's audio followed the
  bottom screen's volume slider.

Removes KeepTopActivity, the focus bounce and light pause, the memory
pressure trigger and their tests. onPause runs its departure cleanup every
time again.

tools/memory_guard_ab.py gains a burst mode, reads oom_score_adj without
su (lmkd kills the root manager app and su can then open its request screen
over the game), handles Android 13 dumps, a hung stop and a session that
does not start. docs/development/memory-guard-ab.md has the Thor results.

* test(session): the guard A/B fill mode starts its counter again, and a pressure run with no completed run fails

* test(session): the burst seed is rebuilt unless it is exactly 256 MiB

* test(session): the guard A/B burst takes its last partial chunk, and only a hog run that finished counts
2026-11-20 11:40:10 -05:00
MaxsTechReview acb2cba970 fix(ci): add-on packs compress the same on every runner (#2938)
The proot pack pin check failed on GitHub-hosted runners for PRs that do
not touch proot. The hosted image puts the latest upstream zstd (1.5.7)
in /usr/local/bin, while the self-hosted runners use zstd 1.5.5, and
zstd -19 output differs between those versions for identical tar input.

tools/packs/build.sh now compresses every pack with the zstd version
pinned in tools/packs/zstd/release.env: the system zstd when it is that
version, otherwise the checksum-verified upstream release built once
into the pack input cache.
2026-11-20 10:27:17 -05:00
Kurt Himebauch e58b463f54 fix(input): declutter the floating gamepad overlay (#2933) 2026-11-20 10:21:32 -05:00
Kurt Himebauch f5d879f222 feat(input): redesign on-screen controls (#2861) 2026-11-20 08:12:37 -05:00
Kurt Himebauch 11fb8f59d4 test(library): cover Hidden in tab ordering 2026-11-20 08:01:41 -05:00
Kurt Himebauch 97e0251e6a fix(input): preserve control visibility and routing 2026-11-20 07:48:12 -05:00
Kurt Himebauch 7c2955b058 fix(preview): use the mouse touch label 2026-11-20 07:33:23 -05:00
Kurt Himebauch ec1d5126c4 fix(input): reconcile the second-screen picker 2026-11-20 07:30:42 -05:00
Kurt Himebauch 56986b5999 fix(session): Home suspends a game another app launched, so Cocoon can resume it (#2919)
* fix(session): Home suspends a game another app launched, so Cocoon can resume it

A game launched from another front end (Cocoon, ES-DE, Daijisho...) or a
home-screen shortcut went into picture in picture on Home. Cocoon brings a
suspended player back by moving its task to the front, which Android ignores
for a task in picture in picture, and the floating game covered Cocoon's
Resume/Close bar. The game kept running instead of suspending, Cocoon's
Resume did nothing, and the only way back was the picture itself.

Automatic picture in picture now applies only to games DroidDeck launched
itself. For games launched by another app (the existing returnHome launch),
Home suspends the session, which is what Cocoon expects. The picture in
picture button still works for those games.

* fix(session): a new launch intent refreshes the automatic picture in picture rule at once
2026-11-20 01:37:02 -05:00
FX1922 a29315f7e0 fix(library): manage the Hidden tab from Manage stores (#2920)
The Hidden tab was the only Library tab missing from Manage stores, and
it was turned on from the Display options instead.

- Hidden is now listed in Manage stores, after Custom games by default,
with its own switch and drag handle like Favorites and Custom games
- It starts off, and a switch someone already turned on keeps its state
- Removes the Hidden entry from the Display options
- The Hidden tab is still never shown in the music tab

Adds tests for the default, the saved switch and the sort order.
2026-11-20 09:22:35 +03:00
FX192 38efe4d6d5 feat(library): manage the Hidden tab from Manage stores instead of the Display options 2026-11-20 09:12:45 +03:00
FX1922 3f5280412d fix(stores): show the itch.io browse grid on the default filters (#2918)
The Itch tab only showed the browse grid after a filter had been
changed. On the default filters it fell back to the old shelves page
(What's New, Deals, Free Games, Trending), so the first thing people saw
was the pre-overhaul layout.

- The Itch tab now always shows the browse grid, like Game Jolt
- On the default filters it loads itch.io/games, itch's own default
Popular page
- The first page loads as soon as the tab opens, and the filters narrow
it from there
- Searching and the other stores are unchanged
2026-11-20 09:05:47 +03:00
FX192 37cf698af2 fix(stores): show the itch.io browse grid on the default filters 2026-11-20 09:01:42 +03:00
Kurt Himebauch fccd13689c feat(ui): one screen picker replaces the D button and the Second screen tab (#2912)
* feat(ui): one screen picker replaces the D button and the Second screen tab

The bottom screen's bar showed the panel's name as plain text, a D
button opened the menu, and the menu's Second screen tab picked the
panel. Now the panel's name is a dropdown right of the X. It lists
"DroidDeck menu" first, then the panels, with a check on the one in
use, so switching panels takes two taps instead of three.

The docked menu's header shows the same dropdown, labelled
"DroidDeck menu", in place of the highlighted D button. Opened there,
focus starts on the last panel, so one press of A goes back to it.
When the menu is on the top screen, the dropdown lists None and the
panels without the menu entry.

The Second screen tab is gone. Its "Show the game on" and display
choices are a Second screen group at the end of the Display tab. The
mode list's hint and its Mode heading are removed with their strings.

Previews of the docked menu (Controller and Display) and of a panel's
bar are added to the rendered preview cases.

* feat(ui): the swap button on the Keyboard + trackpad and Terminal panels

Every bottom-screen panel now has the swap button when the game can move
to the bottom screen; it was only on Deck grips, Profile controls,
Dashboard and Desktop. The swapped top-screen view already shows both
panels.
2026-11-20 00:26:28 -05:00
Kurt Himebauch 5051fc8b32 fix(session): the bottom screen takes touch again while a game runs (#2910)
* fix(session): the bottom screen takes touch again while a game runs

Since #2763, a transparent KeepTopActivity covers every other display while a
session is on top. Its window is NOT_TOUCHABLE, but Android gives a
translucent activity alone in its task an ActivityRecordInputSink that eats
every touch on that display (ENABLE_TOUCH_OPAQUE_ACTIVITIES, on for this
target SDK). With the dual-screen panel closed, the bottom screen's launcher,
Cocoon or any other app could not be touched until the session ended, and
the guard stayed over it after Home/PiP as well.

- The guard now takes touches itself: a touch removes it from that display.
- It comes back when the session is top-resumed again, or after 5 s if the
  session kept the top spot (the user touched the bottom screen once and
  stayed in the game).
- Stopping or entering PiP removes the guards; PiP keeps the session at adj
  50 with or without them, so they protected nothing there.

A/B on a Retroid Pocket Duo (Android 16, Cocoon as bottom home): the guard
is on top in every state it was on top on main, except the 5 s after a
bottom touch and PiP. Under lmkd pressure (kills down to adj 50, bottom
home killed 14-31 times per run) neither build lost the top spot.

* test(session): A/B tool for the keep-top guard on rooted dual screens, with Duo findings

* test(session): the guard A/B tool stops on a failed session start and cleans up an interrupted pressure run
2026-11-20 00:18:50 -05:00
MaxsTechReview 4e81030fb8 fix: source builds start a session again on storage without hard links (#2908) 2026-11-20 00:00:27 -05:00
Kurt Himebauch dc9d1b81cc feat(frontend): launch from every frontend file format and store, with per-store game files (#2872) 2026-11-19 22:41:04 -05:00
Kurt Himebauch 45c31a480a Default WINESTEAMNOEXEC=0 for Black Ops II (#2892) 2026-11-19 21:27:49 -05:00
Kurt Himebauch 00557703da feat(dev): preview states for the Library and the in-game menu (#2899)
* Developer tools: preview states for the Library and the in-game menu

Settings › Developer gets a Preview states group (shown with developer
tools on):
- Library: nothing installed, signed out of every store, or sample games
  in every store (each store's storefront games passed off as owned, a
  few as installed). A pill on the Library says which preview is on and
  ends it. Nothing is installed, removed or signed out, and the preview
  is never saved, so a restart always turns it off.
- In-game menu: opens the session menu over the launcher for Steam,
  Desktop or a game, without starting a session. Its switches change only
  the preview. LB/RB switch pages and B or Back closes it, as in a session.

* Preview states: Back closes the menu preview; signed-out preview covers expired stores

The launcher's exit gesture no longer takes Back while the in-game menu
preview is open, so Back closes the preview. The signed-out Library
preview shows the sign-in card for an expired store with cached games too.

* Developer tools: a UI zoo sheet for previews; previews are read-only

The Developer tab keeps one UI zoo row instead of the preview pickers. It
opens a side sheet listing the in-game menu (Steam, Desktop, game) and the
Library states; nothing shows until one is picked, and picking one closes
the sheet. A Library preview switches to the Library on All games.

While a Library preview is on, opening a game shows a short note instead
of its page, which would act on the real install behind the preview.
Size sorting uses the size a card shows, so a real install shown as not
installed sorts by its catalog size.

* Developer tools: preview shortcuts, a Library toolbar button for preview states

An opt-in Preview shortcuts switch (off by default) puts a flask button
in the Library's toolbar that picks the real library or a preview state
in place, so a state is a tap away while using the launcher normally.
The UI zoo stays the catalog of every preview.

* Preview states: no real sign-in or sign-out from a Library preview

The toolbar's sign-out button is hidden while a Library preview is on,
and the sign-in card's button only says previews are read-only, so a
preview never signs a real account in or out.
2026-11-19 21:26:31 -05:00