Skip to content

feat: use the full screen width for cutscenes and add nokeepaspectratio - #28

Merged
jackrayner merged 5 commits into
mainfrom
feat/cinematic-fullwidth
Oct 24, 2026
Merged

jackrayner merged 5 commits into
mainfrom
feat/cinematic-fullwidth

Conversation

@jackrayner

Copy link
Copy Markdown
Owner

Port of upstream PR 186 (bolrog/d2dx, by Jarcho), tracker item 1 of the remaining planned work. It addresses upstream issue 99 (cutscenes only ever 4:3). Not tested in the game: the cinematic drawing code is not compiled or run by the Linux tests, so Windows CI is only a build check.

What it does

  • Cutscenes (after the intro FMV) are cropped to their 640x292 letterbox content and scaled to the full width of the screen, keeping the aspect ratio, instead of the 4:3 box.
  • The framebuffers follow the game size, so the resolution can switch freely (a cutscene sets a 640x292 game size; the next Glide window open restores the game's size).
  • New option nokeepaspectratio (cfg [optouts] key and -dxnokeepaspectratio): stretches the whole game to the window/screen. Off by default.

Our changes on top (separate commits)

  • GetRenderRect: the PR's early return is added in front of our out-of-bounds fix, which is untouched; with the option off the code path is identical to before (the old callers passed an argument the function ignored). The parameter is renamed keepAspect.
  • Unit tests: the existing desktop-size sweeps now pass keepAspect = true explicitly, and the same sweeps run with false, asserting the rect is exactly the desktop.
  • Docs: nokeepaspectratio in d2dx-defaults.cfg and docs/configuration.md; Jarcho added to the README credits.
  • One conflict: the PR's context still had a 4M vertex buffer; the resolution keeps our 1M capacity.

Please merge with a rebase merge (not squash, not a merge commit) so the three upstream commits keep Jarcho as author and the release notes list each change once.

Worth testing by hand: a cutscene at your resolution (expect full width, small bars top and bottom), and gameplay afterwards (game size restored). The 640x292 crop (rows 94 to 385) assumes every cinematic has the same letterbox; ones that don't would be cropped wrongly. nokeepaspectratio stretches the whole game, not only cutscenes.

🤖 Generated with Claude Code

Jarcho and others added 5 commits October 24, 2026 16:45
…solution switching.

Ported from upstream PR 186 (bolrog/d2dx). Resolved a conflict in
RenderContext.cpp by keeping this fork's smaller vertex buffer capacity.

(cherry picked from commit bb68a88)
Ported from upstream PR 186 (bolrog/d2dx).

(cherry picked from commit 2433e9cc176ad77960667d2bea09ccc0626ad0c0)
Ported from upstream PR 186 (bolrog/d2dx).

(cherry picked from commit 5e0b379)
The ported GetRenderRect takes a keepAspect flag instead of the unused
wide flag. When it is false the rect is the whole desktop. The merge with
this fork's out-of-bounds fix needed no manual change: the PR only adds an
early return, so the fit-by-width-then-height logic is untouched.

TestMetrics now passes keepAspect=true for the existing sweeps (the wide
flag still only selects the suggested game size) and repeats the standard
and non-standard desktop size sweeps with keepAspect=false, asserting the
rect is exactly the desktop.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the nokeepaspectratio key and the -dxnokeepaspectratio flag to
docs/configuration.md and credit the author of ported upstream PR 186 in
the README.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jackrayner
jackrayner merged commit 3038284 into main Oct 24, 2026
4 checks passed
@jackrayner
jackrayner deleted the feat/cinematic-fullwidth branch October 24, 2026 17: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.

2 participants