From 2a3af54e92f9600094b22b28b8878eb20761a444 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 6 Jan 2011 08:55:10 +0000 Subject: Kiosk mode, full screen. requested by dante3rd diff --git a/includes/defines.h b/includes/defines.h index b2bec4e..1f134a6 100644 --- a/includes/defines.h +++ b/includes/defines.h @@ -102,6 +102,8 @@ int GRAV_B2; extern int legacy_enable; +extern int kiosk_enable; + extern int sys_pause; extern int framerender; diff --git a/src/graphics.c b/src/graphics.c index 525f0bb..4f65ef4 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -3381,9 +3381,15 @@ void sdl_open(void) //glFlush (); #else #ifdef PIX16 - sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,16,SDL_SWSURFACE); + if(kiosk_enable) + sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,16,SDL_FULLSCREEN|SDL_SWSURFACE); + else + sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,16,SDL_SWSURFACE); #else - sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,32,SDL_SWSURFACE); + if(kiosk_enable) + sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,32,SDL_FULLSCREEN|SDL_SWSURFACE); + else + sdl_scrn=SDL_SetVideoMode(XRES*sdl_scale + BARSIZE*sdl_scale,YRES*sdl_scale + MENUSIZE*sdl_scale,32,SDL_SWSURFACE); #endif #endif if(!sdl_scrn) diff --git a/src/main.c b/src/main.c index 1343b96..3c3cfb3 100644 --- a/src/main.c +++ b/src/main.c @@ -134,6 +134,7 @@ int core_count() } int mousex = 0, mousey = 0; //They contain mouse position +int kiosk_enable = 0; void sdl_seticon(void) { @@ -1158,6 +1159,11 @@ int main(int argc, char *argv[]) { hud_enable = 0; } + else if(!strncmp(argv[i], "kiosk", 5)) + { + kiosk_enable = 1; + sdl_scale = 2; + } } save_presets(0); -- cgit v0.9.2-21-gd62e