vulkan: preserve the game aspect when presenting #205
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!205
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/preserve-game-aspect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #119. Refs #297.
Fit the game's source crop into a centered presentation rectangle and clear uncovered areas to black, including frame-generated presents. Preserve the existing camera-aspect override when Ultrawide or HOS_ASPECT is enabled.
This branch retains upstream controller callbacks and appends the aspect callback after them, requiring renderer API4. Deploy the executable and DLL together; the actual renderer rejects null/API3 hosts before loading Vulkan.
Validation:
e40306e.FG-off active-filter testing above includes #417, which fixes an existing independent upscaler bypass; this PR's aspect change does not include that fix or claim to solve the reported RTX4070 black screen.
These are compatibility checks, not native60+FPS evidence. Warm gameplay was roughly48-52FPS at100% resolution. The first cold run sustained11.6-11.8FPS after shader jobs finished and recovered to46-50FPS after F11; the cause remains unexplained and the initial failure is preserved.
The panel is5120x2160, so physical32:9 fullscreen and the reporter's RTX4070 remain unverified. AMD/Intel/Linux runtime, physical audio/controller behavior, wider progression and arbitrary drag/minimize transitions are also untested. No speculative black-screen workaround is included.
Tested the same approach on another setup, and found one case where it goes black.
Setup: RTX 4070, 5120x1440 (32:9), Windows 11, fullscreen, the
movie-syncbuild (44abdcd). Frame generation Off, Ultrawide 16:9, Resolution 100%.I patched only
hookshot_vk.dllwith essentially the same change as this PR: a centered fit rectangle, a black clear, then the blit into the rectangle.framegen_scale(..., rect.w, rect.h), as in this PRframegen_scale(..., swap_extent.w, swap_extent.h), then blit that into the rectSwitching Upscaling to Off live in the Insert menu brought the picture back right away, so the black screen comes from upscaling straight to the rectangle's size. I didn't find the root cause. Your 5090 test had frame generation at 2x, and mine had it off, so that may be the difference.
The workaround I'm running upscales at the window's size (as before this PR) and then blits that into the rectangle:
It does extra upscaling work on wide screens, so it's a workaround, not a fix. Happy to test a build or send logs.
Also relevant to #119 (16:10 laptop, stretched in fullscreen).
Thanks, this is a good fix for #119/#297. Before merging: a 32:9 user reported a black picture with upscaling on (see #297). Could you check that case (3840x1080 or 5120x1440 fullscreen with Upscaling Catmull-Rom/Lanczos) and the frame generation path at those sizes? Also, it bumps the renderer API to v2, which #324 also did; that one is closing, so v2 is yours.
Merged, thanks! Tested here on a 3440x1440 monitor with a 2580x1080 window: the picture keeps its 16:9 shape with bars at the sides, with Upscaling off and with Lanczos, no black picture. If the 32:9 black case comes back with this, please open an issue with the window size and the Insert menu settings.