Repository navigation
In-game menu: its picture on the hardware renderer; unmuting a game started muted opens the audio device (#74) - #105
Merged
gascarcella merged 1 commit intoOct 24, 2026
Conversation
…tarted muted opens the audio device (#74) The hardware renderer's swapchain cannot be read back (SDL creates its images to be drawn and blitted into only), so <PREFIX>_PORT_MENU_SHOT was the software renderer's alone. The present that takes the picture now draws the game's picture and the menu into a texture of the swapchain's format, blits it into the swapchain and downloads it (menu.h port_menu_shot_due, port_menu_shot_save). tests/hello_test.py --menu --gpu takes the Settings page on the hardware renderer (Mesa's lavapipe, which presents to SDL's offscreen driver) and requires the software picture but for anti-aliased edges; CI's launcher job installs lavapipe and runs it. A game started with audio.mute had no audio device, so switching the mute off in the menu only took effect at the next start. The device now opens when audio.mute goes from on to off (paused while the menu's pause lasts); --mute alone keeps it shut, and a device that failed to open is not asked for again. The menu test starts muted and its live file unmutes it: the device must open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gascarcella
force-pushed
the
gascarcella/launcher-in-the-games-window-the-launchers-scree
branch
from
October 24, 2026 20:48
ddf951c to
ddfb319
Compare
gascarcella
deleted the
gascarcella/launcher-in-the-games-window-the-launchers-scree
branch
October 24, 2026 21:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two leftovers of #74, the in-game menu.
What
<PREFIX>_PORT_MENU_SHOTwas the software renderer's only: SDL creates the swapchain's images to be drawn and blitted into, not read (Vulkan:COLOR_ATTACHMENT | TRANSFER_DST; D3D12:RENDER_TARGET_OUTPUT). The present that takes the picture now draws the game's picture and the menu into a texture of the swapchain's format, blits it into the swapchain (the window shows what is saved) and downloads it (runtime/render_gpu.c;menu.hport_menu_shot_due,port_menu_shot_save). Every other present is unchanged.audio.mutehad no audio device, so switching the mute off in the menu waited for the next start. The device now opens whenaudio.mutegoes from on to off (paused while the menu's pause lasts, playing when the game goes on).--mutealone keeps it shut (only a change ofaudio.muteopens it), and a device that failed to open is not asked for again (runtime/audio.c).tests/hello_test.py --menustarts muted and its live file unmutes it: the device must open.--menu --gpualso takes the Settings page on the hardware renderer, on Mesa's lavapipe (which presents to SDL's offscreen driver; NVIDIA's driver cannot), and requires the software picture but for anti-aliased edges: at most 0.1 % of the pixels off by more than 8 levels. Measured: lavapipe against OpenGL, 0 such pixels (at most 2 levels); NVIDIA's D3D12 under Wine, 54 (a radio button's rim); another page, 55,259. The PNG is read without Pillow.launcherjob installsmesa-vulkan-driversand runs--menu --gpu;menu-gpu.pngjoins the kept pictures.docs/LAUNCHER.md"In-game menu" and theaudio.muterow,docs/RUNTIME.md, CLAUDE.md's command line.Gates that ran
python3 tests/hello_test.py --menu --gpupython3 tests/hello_test.py(headless)PSXSTACK_SDLalone,--input-teston both renderers--exe --wine --gpupass--renderer gpu(D3D12, vkd3d, NVIDIA)--self-test(offscreen)py_compilemain(with #112) with the submodule at this branch:scripts/test.sh --layer portbuild/port-sdl(-DPSXSTACK_SDL=ON -DPSXSTACK_MENU=ON), CI's input self-testsrebound.json), the menu's round trip in bothtests/port/render_gpu.py --lavapipe(the window's SDL_GPU present headless, which the port layer skips on NVIDIA)Rebased onto
mainafter #102–#104 (Player 2), conflicts in the docs,menu.cpp's header comment and the test's docstring only. Re-run on the rebased commit:hello_test.py --menu --gpu(now with the players' part),hello_test.pyheadless, both Windows cross-builds (no warnings) and--exe --wine --gpu. The dw2003recomp rows were run before the rebase.Not run: a real Steam Deck or real Windows with these two changes (the menu itself has been play-tested for hours on Linux and the Deck with the hardware renderer).
🤖 Generated with Claude Code