Draw Ocarina in the window's shape: a wider picture and camera, with the HUD, menus and movies kept 16:9 in the middle.

The patch sets of recomp/patches-v111.txt read the game's 2560x1440 picture and 1920x1080 scene sizes from the patch page, give every 16:9 camera the picture's ratio, squeeze the UI's full-screen projection into the middle 16:9 (fades and the menu backgrounds that redraw a capture stay full width) and pillarbox movies. runtime/widescreen.c sets them up from the new Screen tab row Widescreen (NX2NAVI_GAME_ASPECT: 16:9, window, 21:9 or 32:9, at the next start).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-07 02:17:28 -05:00
parent 29cab01da7
commit 91c147a0aa
10 changed files with 206 additions and 4 deletions

View File

@@ -192,9 +192,11 @@ static void refresh_rate_update(HWND h, int force) {
gfx_window_set_refresh(monitor_rate_hz(mon));
}
// Before the window exists (widescreen.c wide_init at start), the primary monitor: the one a fullscreen window opens on.
int gfx_window_monitor_size(int *w, int *h) {
MONITORINFO mi = {sizeof mi};
if (!g_hwnd || !GetMonitorInfoW(MonitorFromWindow(g_hwnd, MONITOR_DEFAULTTOPRIMARY), &mi)) return 0;
HMONITOR mon = g_hwnd ? MonitorFromWindow(g_hwnd, MONITOR_DEFAULTTOPRIMARY) : MonitorFromPoint((POINT){0, 0}, MONITOR_DEFAULTTOPRIMARY);
if (!GetMonitorInfoW(mon, &mi)) return 0;
*w = mi.rcMonitor.right - mi.rcMonitor.left;
*h = mi.rcMonitor.bottom - mi.rcMonitor.top;
return 1;