Skip to content

Comments

Fix Alt+Enter client crash#252

Merged
GooberRF merged 4 commits intoGooberRF:masterfrom
nickalreadyinuse:fix-alt-enter
Feb 24, 2026
Merged

Fix Alt+Enter client crash#252
GooberRF merged 4 commits intoGooberRF:masterfrom
nickalreadyinuse:fix-alt-enter

Conversation

@nickalreadyinuse
Copy link

Toggles between fullscreen and windowed/borderless now.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a client crash that occurred when pressing Alt+Enter to toggle fullscreen mode. The crash was caused by DXGI's built-in Alt+Enter handler calling SetFullscreenState internally without the application's knowledge, which put the swap chain in an inconsistent state and caused the next Present() call to fail.

Changes:

  • Disabled DXGI's built-in Alt+Enter handling using MakeWindowAssociation with DXGI_MWA_NO_ALT_ENTER
  • Implemented custom Alt+Enter handling in the message handler to toggle between fullscreen and windowed modes
  • Added renderer null check in the message handler for safety
  • Fixed missing break statement after WM_ACTIVATEAPP case

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
game_patch/graphics/d3d11/gr_d3d11_hooks.cpp Added custom Alt+Enter handler in WM_SYSKEYDOWN, added renderer null check, and fixed missing break statement
game_patch/graphics/d3d11/gr_d3d11.cpp Disabled DXGI's built-in Alt+Enter handling via MakeWindowAssociation
docs/CHANGELOG.md Added changelog entry documenting the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@is-this-c
Copy link

is-this-c commented Feb 22, 2026

The reason Present fails is because Alpine Faction uses DXGI's flip presentation model which requires ResizeBuffers after mode transitions. Your comments should include this detail.

@GooberRF GooberRF merged commit 34a8412 into GooberRF:master Feb 24, 2026
2 checks passed
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.

3 participants