The title outputs 16:9 whatever its window is, and the swap chain was stretched
over the window.
LEONIDA_ASPECT=21:9|32:9|W:H|auto makes the title's window in that shape (at the
height it asks for, then fitted to the screen as before). LEONIDA_PRESENT_SCALE
=fit keeps the picture's shape in a window of another one: the swap chain
becomes a frame of the window's shape at the picture's height, cleared to
black, with the picture copied unscaled into its middle; =stretch is the
present as it was. Unset: fit with LEONIDA_ASPECT, else stretch, so nothing
changes without them (a 16:9 window's frame is the picture and the copy is the
same CopyResource). With bars, frame generation is told where the picture is
in the back buffer.
This is the fallback, not a wider view. For the real thing the title has to
output a wide size: LEONIDA_OUTPUT=WIDTHxHEIGHT (experimental) changes the
3840x2160 row of its mode table together with the scanout reservation that
has to fit it (the check LEONIDA_OUTPUT_1440 tripped, at rva 0x247af2d, wants
under 2 MiB of the reservation left) and the Settings viewport, after VIctory's
native 1440p profile as runtime/src/display_profile.h records it.
docs/ultrawide.md lists what the executable shows of the output size, the
render size and the shapes it knows, and what a run has to answer before this
can be called ultrawide (whether a wide row is taken, the projection, the HUD).
Unit tests: the frames and shapes (aspect.rs), the reservation sum and the
three places against the 1.0.2.1 executable (hooks.rs). Not run in the game.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- LEONIDA_ASPECT (21:9, 32:9, 43:18, any W:H or ratio from 1 to 4, or auto) widens the display mode
the runtime reports to the title, at the same height, and widens the title's window.
- LEONIDA_PRESENT_SCALE=fit|stretch: fit keeps the frame's shape, centred with black bars. It is
the default when LEONIDA_ASPECT is set; stretch, the old behaviour, is the default otherwise.
- The aspect math is in src/aspect_fit.h, with aspect_fit_test.
- docs/ultrawide.md describes how resolution flows from window to title to present, and what
needs the game running: whether the title renders wider at all, its FOV and its HUD.
- play.ps1 gets -Aspect and -PresentScale.
Built; aspect_fit_test passes. The bars have not been checked on screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>