Skip to content

The picture fits the screen: video.scaling (fit by default), the wide canvas at the window's aspect - #106

Merged
gascarcella merged 1 commit into
mainfrom
gascarcella/screen-fit
Oct 24, 2026
Merged

gascarcella merged 1 commit into
mainfrom
gascarcella/screen-fit

Conversation

@gascarcella

Copy link
Copy Markdown
Owner

Seen on a Steam Deck (1280x800, fullscreen, GPU renderer): black bars on every side of the field, and battles smaller than the field.

Why

video_dest placed the picture only at whole multiples of its 240 lines. On 800 lines that is 720 (the field at 960x720). The widescreen canvas (428 columns, slightly wider than 16:9) never fit a 16:9 picture at full height, so it dropped a whole multiple: 856x480 on the Deck, 2140x1200 on 1440p, 3424x1920 on 4K.

What

  • video.scaling (--scaling; Settings → Scaling, applied live from the in-game menu): fit (default, as large as the screen allows at the picture's aspect), integer (the old placement, every line the same height), stretch (the whole screen). The launcher writes the key only once chosen; an older game logs it and ignores it.
  • The wide canvas follows the window's aspect, 4:3 to 16:9 (video_wide_follow → render_gpu_wide_set_aspect): a 16:10 Deck gets a 384-column battle that fills 1280x800; 16:9 without a window (screenshots, tests).
  • Whole columns, rounded down (426 at 16:9 instead of 428): a whole multiple fits a screen of that aspect. integer shows the canvas pixel for pixel; fit/stretch spread it to the window's aspect (under a column).
  • Docs: RUNTIME "The window", LAUNCHER members table, PORT "Rendering", GAME_CONTRACT, DECISIONS (new entry "The picture fits the screen; whole multiples are a choice"; the widescreen entry notes the aspect).

Deck, fit: field 1067x800 (bars at the sides only), battle 1280x800, boot screen 1067x800.

Gates

  • tests/hello_test.py, tests/hello_test.py --menu --gpu: pass
  • Launcher self-test: 574 of 574 (new video.scaling checks: not added unchosen, read/written, a bad value warned)
  • Against dw2003recomp with the disc (RTX 4070 Ti SUPER), with its test updates (the pin-bump PR): tests/port/render_gpu.py (present references at fit; battle 426x240 / 852x480 at scale 2; the 1920x1080 present at 16:9), render_filters.py (--scaling integer), settings.py, mods.py: pass
  • Not run here: a real 16:10 window (the offscreen driver cannot give one); the owner's Deck play-test.

🤖 Generated with Claude Code

… canvas at the window's aspect

On a screen whose height is not a whole multiple of the game's 240 lines the picture was much smaller than the
screen: video_dest only scaled by whole multiples, so a Steam Deck (1280x800) showed the field at 960x720 with bars
on all four sides. The 16:9 battle (the widescreen canvas, 428 columns: a little wider than 16:9) never fit a 16:9
screen at full height and dropped a whole multiple: 856x480 on the Deck, smaller than the field, and 2140x1200 on a
1440p screen.

- video.scaling (--scaling; the Settings screen's Scaling, live from the in-game menu): fit (the default: as large
  as the window allows at the picture's aspect), integer (the old placement: every line the same height) or stretch
  (the whole window). The launcher writes the key once chosen; an older game logs it and ignores it.
- The wide canvas follows the window's aspect from 4:3 to 16:9 (video_wide_follow, render_gpu_wide_set_aspect): a
  16:10 screen gets a 16:10 battle (384 columns) that fills it; 16:9 without a window. Its columns are rounded down
  (426 at 16:9), so a whole multiple fits a screen of that aspect: integer shows the canvas pixel for pixel, fit and
  stretch spread it to the window's aspect (less than a column).

Gates: tests/hello_test.py, tests/hello_test.py --menu --gpu, the launcher self-test (574 of 574, video.scaling's
checks among them); against dw2003recomp (the disc, an RTX 4070 Ti SUPER): tests/port/render_gpu.py (the present at
fit; the battle 426 wide, into 1920x1080 at 16:9), render_filters.py (--scaling integer), settings.py, mods.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gascarcella
gascarcella merged commit 538389f into main Oct 24, 2026
5 checks passed
@gascarcella
gascarcella deleted the gascarcella/screen-fit branch October 24, 2026 23:09
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