Skip to content

Borderless fullscreen (Windows): keep the window composed (one row taller) - #712

Open
yacineolivier-maker wants to merge 1 commit into
RetroPortingToolKit:masterfrom
yacineolivier-maker:fix-borderless-fullscreen-composed
Open

yacineolivier-maker wants to merge 1 commit into
RetroPortingToolKit:masterfrom
yacineolivier-maker:fix-borderless-fullscreen-composed

Conversation

@yacineolivier-maker

@yacineolivier-maker yacineolivier-maker commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

A window exactly covering the display is promoted by Windows to a direct /
independent flip. OpenGL swaps issued from the render thread then stop
reaching the screen on NVIDIA drivers: the image freezes while the game keeps
running, and it comes back as soon as anything forces composition (taskbar,
another window, a tooltip). The borderless window is now one row taller than
the display (the extra row is off-screen), so it always stays composed.
test_window_fullscreen checks the new size.

Seen with R4 on an RTX 3060 (driver 576.57), Windows 11, render thread on.

Verification

  • Game-agnostic: no title check or game address in the framework; behaviour is unchanged unless borderless fullscreen is used on Windows.
  • Build: R4 (tetrisgm/RidgeRacerType4Recomp master 737827c, USA config, its committed generated C) built against this branch alone: cmake-clang-v1 1.0.14 (clang, Ninja, Release), Windows 11.
  • Runtime: exercised in R4's PAL build (SCES-01706) with all of our framework branches combined on current master fe8d937d: boot, menus, a full Time Attack lap. The same changes on the previous base (379565a6) went through several days of play-testing: intro movie, menus, races, VS split screen, attract demo. Windows 11, i5-12400F, RTX 3060, OpenGL renderer; Vulkan and the software renderer were not tested.
  • Test: test_window_fullscreen updated for the new size; not run here (it is the opt-in desktop test, PSX_WINDOW_FULLSCREEN_TEST). Before/after checked by hand in R4: frozen image with the render thread on before, none after.
  • Pin / regen: runtime only, no regen. A game consumes it with a pin bump.

Game side: tetrisgm/RidgeRacerType4Recomp#49 (PAL / Europe support) and tetrisgm/RidgeRacerType4Recomp#50 (race HUD, car effects, lighting; overview in tetrisgm/RidgeRacerType4Recomp#51)

I cannot follow up on review comments, sorry. Maintainers are welcome to edit, split, take over or close this.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rkyma8rbyPiccs9n2bkyG6

@mstan mstan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 20a9312.

The reported NVIDIA render-thread freeze merits a default correctness fix. This patch applies a one-pixel oversized window to every Windows borderless session, including software/Vulkan and configurations that do not use the affected GL render thread. That changes drawable height/aspect and can cross a DPI/monitor boundary; updating a test to require h+1 only asserts the workaround. Please scope the affected presentation path using the effective renderer/window/thread state, or provide evidence that the broader borderless policy is desired. Validate actual captions/window bounds, multi-monitor and non-100% DPI behavior, fullscreen exit/re-entry, and capture the real window to establish continuing presents. This is not a reason to put the correctness repair behind an enhancement opt-in. Coordinate with #723 rather than layering two unqualified platform-wide pacing workarounds. Tracking: beads-8zz2.

…ller)

A window exactly covering the display is promoted by Windows to a direct /
independent flip. OpenGL swaps issued from the render thread then stop
reaching the screen on NVIDIA drivers: the image freezes while the game keeps
running, and it comes back as soon as anything forces composition (taskbar,
another window, a tooltip). The borderless window is now one row taller than
the display (the extra row is off-screen), so it always stays composed.
test_window_fullscreen checks the new size.

Seen with R4 on an RTX 3060 (driver 576.57), Windows 11, render thread on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rkyma8rbyPiccs9n2bkyG6
@mstan
mstan force-pushed the fix-borderless-fullscreen-composed branch from 20a9312 to 1697e91 Compare October 24, 2026 18:20

@mstan mstan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased cleanly onto current master and pushed 1697e91. The dummy-SDL geometry/restore test passes, but that is not evidence that the one-extra-row workaround prevents independent flip on an affected Windows desktop.

Before treating this as ready, please provide a reproducible affected driver/DPI/monitor case and DWM/PresentMon evidence for the proposed scope/default. The available host has a different NVIDIA driver from the reported reproducer. A universal fullscreen-size policy is a design/qualification decision; I have not silently changed it or claimed a hidden-window test proves compositor behavior.

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