fix: make Alt+Enter a borderless fullscreen toggle #5

Manually merged
github merged 1 commit from gh-pr/5/head into gh-pr/5/base 2026-11-26 19:55:14 +00:00
Owner

@⁠AutoComput on GitHub · 2026-11-21 10:08 UTC · original
AutoComput:fix/alt-enter-fullscreen → main · +43 −1 · 3 files · 1 commits · merged 2026-11-22 10:19 UTC

TL;DR

  • Problem: Pressing Alt+Enter freezes the picture.
  • Fix: Alt+Enter now switches between a window and borderless fullscreen.

Alt+Enter is handled by DXGI, which takes the swap chain fullscreen without the buffers being resized, and every Present fails after that. This turns that off with DXGI_MWA_NO_ALT_ENTER and has the window toggle borderless fullscreen on its monitor instead. The swap chain already stretches, so nothing else changes.

test_d3d12_present_window now sends Alt+Enter twice and checks the window covers the monitor and comes back. That only proves the window part. I couldn't reproduce the original freeze without the title, so please try it in game.

Enter is also the A button, so Alt+Enter still presses A. I only changed the Presentation bullet in the README, the known problems line is yours to update once it's confirmed.

**@⁠AutoComput** on GitHub · 2026-11-21 10:08 UTC · [original](https://github.com/Freminet/ScarlettX/pull/5) `AutoComput:fix/alt-enter-fullscreen` → `main` · +43 −1 · 3 files · 1 commits · merged 2026-11-22 10:19 UTC **TL;DR** - **Problem:** Pressing Alt+Enter freezes the picture. - **Fix:** Alt+Enter now switches between a window and borderless fullscreen. Alt+Enter is handled by DXGI, which takes the swap chain fullscreen without the buffers being resized, and every `Present` fails after that. This turns that off with `DXGI_MWA_NO_ALT_ENTER` and has the window toggle borderless fullscreen on its monitor instead. The swap chain already stretches, so nothing else changes. `test_d3d12_present_window` now sends Alt+Enter twice and checks the window covers the monitor and comes back. That only proves the window part. I couldn't reproduce the original freeze without the title, so please try it in game. Enter is also the A button, so Alt+Enter still presses A. I only changed the Presentation bullet in the README, the known problems line is yours to update once it's confirmed.
DXGI's built-in Alt+Enter handling switched the flip-model swap chain to
fullscreen without a resize, after which every Present failed. That is now
disabled and the window toggles borderless fullscreen itself.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:55:12 +00:00
github manually merged commit e0468cba5a into gh-pr/5/base 2026-11-26 19:55:14 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.