Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SDL_WINDOW_FULLSCREEN_DESKTOP in SDL2 builds #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ccawley2011
Copy link
Contributor

This avoids the need to switch display modes when toggling full-screen mode.

@@ -59,6 +59,7 @@ void initializeVideo(uint8_t fastMode)
exit(1);
}

// TODO: Use SDL_WINDOW_FULLSCREEN_DESKTOP in console ports?
Copy link
Owner

Choose a reason for hiding this comment

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

I'd say we don't, since there is no concept of Desktop in them 🤔

@@ -232,7 +233,7 @@ void toggleFullscreen()

void setFullscreenMode(uint8_t fullscreen)
{
SDL_SetWindowFullscreen(gWindow, fullscreen ? SDL_WINDOW_FULLSCREEN : 0);
SDL_SetWindowFullscreen(gWindow, fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
Copy link
Owner

Choose a reason for hiding this comment

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

Is there any consequence of this in scaling or rendering or does it Just Work© in any resolution the user has?

ftortoriello added a commit to ftortoriello/open-supaplex that referenced this pull request Aug 23, 2024
Also, toggle full-screen mode only once if the key combination is kept
pressed.

Based on sergiou87#40
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.

2 participants