SDL: Support low resolution displays by automatically using fullscreen when window is too large.

This commit is contained in:
Sacha committed 2014-11-14 01:38:50 +10:00
1 parent 3c201d073e
commit dea2ae0950
1 file changed
+5
+5
View File
@@ -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;