Skip to content

Launcher: a Filter row for 2D scenes and one for 3D (dw2003recomp #122) - #110

Merged
gascarcella merged 1 commit into
gascarcella/dual-filters-runtimefrom
gascarcella/dual-filters-launcher
Oct 26, 2026
Merged

gascarcella merged 1 commit into
gascarcella/dual-filters-runtimefrom
gascarcella/dual-filters-launcher

Conversation

@gascarcella

Copy link
Copy Markdown
Owner

Part of gascarcella/dw2003recomp#122 (two present-filter sets, one for a game's 2D scenes and one for its 3D scenes). This is stacked on the runtime and contract PR (base gascarcella/dual-filters-runtime). It changes the launcher and the in-game menu only.

What and why

  • Settings layer (launcher/src/settings.{h,cpp}): a FilterSet (filter + crt). video.filter/video.crt are the 3D set, which is the only set for a game without scenes. video.scene_2d is the 2D set.
    • Reading: the launcher reads scene_2d member by member over what an absent one means: game.json's 2d.filter with the default crt, or a copy of the 3D set when game.json names no filter. A runtime and the launcher read it the same way (settled with the runtime side).
    • Writing: scene_2d is written whole once it differs from that default, or once the file already has it. A file that never chose a 2D set gets no scene_2d, the same way video.filter is kept today.
    • Game without scenes: the launcher neither reads nor writes the key, and leaves it as it is in the file.
  • brand.h: GAME_SCENES, the two labels and the 2D default filter, from the generated PSXSTACK_GAME_SCENE* macros.
  • Settings screen (launcher/ui/screens.cpp): for a game with scenes, two rows, "Filter: battles" and "Filter: the field and the menus". Each has its own combo, sliders and help line, and "Smooth (2D)" keeps its label. The rows use a colon rather than the brief's em dash because the UI font has no dash glyph (it drew "?"). A game without scenes gets the same single row as before.
  • In-game menu (launcher/ui/menu.cpp): it marks the set on screen as "(on screen now)", using port_video_scene(). A change to either set is saved and applied live through the existing port_live_apply, which now rebuilds both sets.
  • Docs: docs/LAUNCHER.md adds a video.scene_2d member and the menu's live apply. launcher/README.md describes the self-test's new coverage.

Gates that ran

  • Launcher build and --self-test:
    • for dw2003's description (scenes): 588/588
    • for examples/hello (no scenes): 542/542
  • hello's launcher pictures compared with the base commit's, both run into the same directory: the Settings, Controls, Mods and Disc pictures are pixel-identical. The few that differ are update-screen pictures (one glyph each, plus the whole frame of 19b-Play-update-now); I put that down to the copied base binary's name and its git-describe version but did not check it. hello's pictures don't show the Filter row (no GPU Settings picture); its code path is the old one with a PushID around it.
  • python3 tests/hello_test.py --menu (before the rebase onto the getter) and --menu --gpu (after it, with the menu change): pass.
  • Windows launcher cross-build (llvm-mingw) and its self-test under Wine: 585/585.
  • Not run: dw2003recomp itself. The in-game menu of a game with scenes needs the game and its disc.

For the owner to try

  1. In the launcher, with the GPU renderer: check that the two Filter rows show and each keeps its own filter and sliders. Choose a 2D filter, quit and reopen, and check it is still chosen.
  2. With an existing settings file that has video.filter: check that the battles row keeps that filter and the field row shows Smooth (2D).
  3. In the game's menu, on the field and in a battle: check that the matching row says "(on screen now)". Change each row and check the picture follows as soon as you resume.
  4. Check that a game without scenes (hello) shows one Filter row, as before.

🤖 Generated with Claude Code

@gascarcella
gascarcella added this pull request to stack #112 October 26, 2026 18:27
A game with video.scenes has two present-filter sets (dw2003recomp #122). The launcher's settings layer holds them as
FilterSets: video.filter and video.crt (the 3D set, the only one of a game without scenes) and video.scene_2d (the 2D
set), read member by member over what an absent scene_2d means (game.json's 2d.filter with the default crt values,
else a copy of the 3D set), written whole once it differs from that or the file has it, so a file that never chose a
2D set stays as it was. A game without scenes neither reads nor writes the key.

The Settings screen draws, for such a game, two Filter rows, "Filter: <3D label>" and "Filter: <2D label>", each
with its combo, sliders and help line (a colon: the UI font has no dash); the screen of a game without scenes is
unchanged. The in-game menu marks the set on screen through the runtime's port_video_scene(); a change to either set
is saved and applied live as before (port_live_apply rebuilds both). brand.h carries the labels and the 2D default
from the generated PSXSTACK_GAME_SCENE* macros.

The self-test covers the scene_2d round trip, the absent, partial and bad cases, the key left alone by a game without
scenes, and a picture of the two rows with the 2D one marked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gascarcella
gascarcella force-pushed the gascarcella/dual-filters-launcher branch from 3ba9863 to 5d838d8 Compare October 26, 2026 18:28
@gascarcella
gascarcella merged commit 5b2debf into main Oct 26, 2026
5 checks passed
@gascarcella
gascarcella deleted the gascarcella/dual-filters-launcher branch October 26, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant