Skip to content

Mac: don't vid_restart when toggling full-screen#1582

Merged
slipher merged 1 commit intoDaemonEngine:masterfrom
slipher:mac-fullscreen
Mar 8, 2025
Merged

Mac: don't vid_restart when toggling full-screen#1582
slipher merged 1 commit intoDaemonEngine:masterfrom
slipher:mac-fullscreen

Conversation

@slipher
Copy link
Copy Markdown
Member

@slipher slipher commented Mar 7, 2025

The keyboard shortcut (Command+F) for toggling fullscreen mode unnecessarily issued vid_restart. It works fine without that as can be seen by just setting the cvar r_fullscreen.

The keyboard shortcut (Command+F) for toggling fullscreen mode
unnecessarily issued vid_restart. It works fine without that as can
be seen by just setting the cvar r_fullscreen.
@slipher
Copy link
Copy Markdown
Member Author

slipher commented Mar 7, 2025

There's an ominous comment in SDL documentation: "Note that for some renderers, this function may trigger an SDL_RENDER_TARGETS_RESET event. Your application should be prepared to handle this event by reuploading textures!" But people say this doesn't happen for OpenGL contexts. Anyway, if there were a possible bug, you could already trigger it by setting the cvar directly.

Copy link
Copy Markdown
Contributor

@VReaperV VReaperV left a comment

Choose a reason for hiding this comment

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

Not tested, but code LGTM.

@illwieckz
Copy link
Copy Markdown
Member

illwieckz commented Mar 7, 2025

It was likely a relic of some very old code. For example Tremulous GPP was issuing a vid_restart on Alt+Enter (likely because of having to switch the overbright mode). This relic still being there is likely related to the fact macOS is less used and this was overlooked.

@slipher slipher merged commit 96f0611 into DaemonEngine:master Mar 8, 2025
9 checks passed
@slipher slipher deleted the mac-fullscreen branch March 8, 2025 07:26
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.

4 participants