fix(render): Restore windowed fullscreen to prevent device loss - #545
Closed
sailro wants to merge 1 commit into
Closed
fix(render): Restore windowed fullscreen to prevent device loss#545sailro wants to merge 1 commit into
sailro wants to merge 1 commit into
Conversation
Exclusive fullscreen can remain in D3DERR_DEVICELOST for roughly 45 seconds after startup on Windows 11 with NVIDIA GPUs. During that time, DX8Wrapper::End_Scene sleeps for 200 ms per frame and rendering drops to about 5 FPS. Restore the existing GeneralsOnline windowed-fullscreen path. It keeps the fullscreen appearance while creating a windowed D3D device, which avoids the lost-device state and remains stable at the configured frame rate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6fc47f85-1023-4457-9df0-8e97163e72f0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restore the existing
GENERALS_ONLINE_WINDOWED_FULLSCREENpath so the game keeps a fullscreen appearance while using a windowed Direct3D device.Problem
On Windows 11 with an NVIDIA GPU, true exclusive fullscreen can enter a prolonged
D3DERR_DEVICELOSTstate shortly after startup while the game is foreground and not minimized.Measured behavior on current GeneralsOnline
main:DX8Wrapper::IsDeviceLost = trueDX8Wrapper::FrameCount = 0The same source issue reproduces on clean current TheSuperHackers main and is tracked upstream here:
A/B results
-nologo-nologo -noshellmap-winGENERALS_ONLINE_WINDOWED_FULLSCREENThe validated borderless build ran through the full historical failure interval with a continuously advancing frame counter and
IsDeviceLost = false.Context
GeneralsOnline originally enabled this path in
09c061a53("stop using FSE") and later switched back to exclusive fullscreen in8c257240c. The implementation already exists inWinMain.cppanddx8wrapper.cpp; this change only re-enables its feature flag.Related upstream work:
Validation
z_generalsAI disclosure
Investigated and implemented with GitHub Copilot CLI. The device state, frame counter, configured frame limit, focus state, and FPS were measured directly from the running process without debugger attachment during the final A/B tests.