Keep the presenter windowed when Alt+Enter is pressed #149

Open
github-bot wants to merge 1 commit from github-bot/gh-149 into main AGit
Owner

@⁠feanorsun on GitHub · 2026-11-26 07:39 UTC · original
feanorsun:fix/ignore-dxgi-alt-enter → main · +2 −0 · 1 files · 1 commits · open

Refs #91

The reporter observed that Alt+Enter froze the picture on an RX 9070 while audio continued, and identified staying windowed as an acceptable outcome.

After creating the swap chain, the presenter now calls MakeWindowAssociation(hwnd, DXGI_MWA_NO_ALT_ENTER) on the same DXGI factory. The HWND is the one passed to CreateSwapChainForHwnd, whether it came from the title or from the fallback window. An association failure propagates through the presenter's existing error path.

Windows verification

  • cargo check --locked -j 1 -p victory-gpu --lib and git diff --check passed.
  • A local interactive probe used the production Host::presenter to create a swap chain for one visible 640 × 240 window on an NVIDIA GeForce RTX 5080 Laptop GPU. It presented changing colors, displayed the frame count in the title, and dispatched a manually entered Alt+Enter normally.
  • Before the keypress and throughout the following 3.028 seconds, DXGI reported windowed mode. The window retained focus and its client size. The swap chain's last present count advanced from 85 to 131 and its displayed present count from 85 to 130. The probe passed and closed automatically.

AMD reporter retest

The original game cutscene on the RX 9070 with Adrenalin 26.11.2 still needs confirmation. During the cutscene, press Alt+Enter once and check that the window stays windowed and the picture continues moving alongside the audio.

**@⁠feanorsun** on GitHub · 2026-11-26 07:39 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/149) `feanorsun:fix/ignore-dxgi-alt-enter` → `main` · +2 −0 · 1 files · 1 commits · open Refs #91 The reporter observed that Alt+Enter froze the picture on an RX 9070 while audio continued, and identified staying windowed as an acceptable outcome. After creating the swap chain, the presenter now calls `MakeWindowAssociation(hwnd, DXGI_MWA_NO_ALT_ENTER)` on the same DXGI factory. The HWND is the one passed to `CreateSwapChainForHwnd`, whether it came from the title or from the fallback window. An association failure propagates through the presenter's existing error path. ## Windows verification - `cargo check --locked -j 1 -p victory-gpu --lib` and `git diff --check` passed. - A local interactive probe used the production `Host::presenter` to create a swap chain for one visible 640 × 240 window on an NVIDIA GeForce RTX 5080 Laptop GPU. It presented changing colors, displayed the frame count in the title, and dispatched a manually entered Alt+Enter normally. - Before the keypress and throughout the following 3.028 seconds, DXGI reported windowed mode. The window retained focus and its client size. The swap chain's last present count advanced from 85 to 131 and its displayed present count from 85 to 130. The probe passed and closed automatically. ## AMD reporter retest The original game cutscene on the RX 9070 with Adrenalin 26.11.2 still needs confirmation. During the cutscene, press Alt+Enter once and check that the window stays windowed and the picture continues moving alongside the audio.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 07:42:27 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/149/head:github-bot/gh-149'
git switch 'github-bot/gh-149'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-149'
git switch 'github-bot/gh-149'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-149'
git switch 'github-bot/gh-149'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-149'
git switch 'main'
git merge --squash 'github-bot/gh-149'
git switch 'main'
git merge --ff-only 'github-bot/gh-149'
git switch 'main'
git merge 'github-bot/gh-149'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.