summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 1b1e8ce..281da0f 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -4094,6 +4094,12 @@ int sdl_open(void)
loadShaders();
}
#else
+ SDL_VideoInfo* info = SDL_GetVideoInfo();
+ if (info->current_w<((XRES+BARSIZE)*sdl_scale) || info->current_h<((YRES+MENUSIZE)*sdl_scale))
+ {
+ sdl_scale = 1;
+ fprintf(stderr, "Can't change scale factor, because screen resolution is too small");
+ }
#ifdef PIX16
if (kiosk_enable)
sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,16,SDL_FULLSCREEN|SDL_SWSURFACE);