Skip to content

Commit

Permalink
Merge pull request #11806 from unknownbrackets/sdl-fbdev
Browse files Browse the repository at this point in the history
SDL: Force fullscreen desktop for USING_FBDEV
  • Loading branch information
hrydgard authored Feb 17, 2019
2 parents fd9c7df + 555a8db commit aa47db8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SDL/SDLMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,16 @@ int main(int argc, char *argv[]) {
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetSwapInterval(1);

// Is resolution is too low to run windowed
// Force fullscreen if the resolution is too low to run windowed.
if (g_DesktopWidth < 480 * 2 && g_DesktopHeight < 272 * 2) {
mode |= SDL_WINDOW_FULLSCREEN_DESKTOP;
}

// If we're on mobile, don't try for windowed either.
#if defined(MOBILE_DEVICE)
mode |= SDL_WINDOW_FULLSCREEN;
#elif defined(USING_FBDEV)
mode |= SDL_WINDOW_FULLSCREEN_DESKTOP;
#else
mode |= SDL_WINDOW_RESIZABLE;
#endif
Expand Down

0 comments on commit aa47db8

Please sign in to comment.