From dea2ae0950406358b3029e3c9190a2aeb464ff8d Mon Sep 17 00:00:00 2001 From: Sacha Date: Fri, 14 Nov 2014 01:38:50 +1000 Subject: [PATCH] SDL: Support low resolution displays by automatically using fullscreen when window is too large. --- base/PCMain.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/base/PCMain.cpp b/base/PCMain.cpp index 51ebea73ec..e7d56e7ea0 100644 --- a/base/PCMain.cpp +++ b/base/PCMain.cpp @@ -477,6 +477,11 @@ int main(int argc, char *argv[]) { portrait = true; } + // Is resolution is too low to run windowed + if (g_DesktopWidth < 480 * 2 && g_desktopHeight < 272 * 2) { + mode |= SDL_WINDOW_FULLSCREEN_DESKTOP; + } + if (mode & SDL_WINDOW_FULLSCREEN_DESKTOP) { pixel_xres = g_DesktopWidth; pixel_yres = g_DesktopHeight;