diff options
| author | Simon <simon@hardwired.org.uk> | 2011-01-06 08:55:10 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2011-01-06 08:55:10 (GMT) |
| commit | 2a3af54e92f9600094b22b28b8878eb20761a444 (patch) | |
| tree | bdbb6effc75185ad1eca0d553bbe645566d92a3d /src | |
| parent | 7e3530a7055b429ac9f879598093a816356e041c (diff) | |
| download | powder-2a3af54e92f9600094b22b28b8878eb20761a444.zip powder-2a3af54e92f9600094b22b28b8878eb20761a444.tar.gz | |
Kiosk mode, full screen. requested by dante3rd
Diffstat (limited to 'src')
| -rw-r--r-- | src/graphics.c | 10 | ||||
| -rw-r--r-- | src/main.c | 6 |
2 files changed, 14 insertions, 2 deletions
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) @@ -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); |
