Exit fullscreen mode when you quit
authorAnsgar Burchardt <ansgar-guest@alioth.debian.org>
Mon, 8 Dec 2008 00:23:07 +0000 (8 01:23 +0100)
committerAnsgar Burchardt <ansgar-guest@alioth.debian.org>
Mon, 8 Dec 2008 18:51:30 +0000 (8 19:51 +0100)
see http://bugs.debian.org/338705

globals.pre
main.c
sdl/gfx.c

index 87c5506..babf59a 100644 (file)
@@ -344,6 +344,7 @@ void register_mask(void *pixels);
 #ifdef USE_SDL
 /* long filelength(int handle); */
 void fs_toggle();
+void exit_fullscreen();
 int intr_sysupdate();
 #endif
 
diff --git a/main.c b/main.c
index 6efdd04..76c9463 100644 (file)
--- a/main.c
+++ b/main.c
@@ -3338,6 +3338,7 @@ void deinit_program(void)
                free(mask_pic);
 
        remove_keyb_handler();
+       exit_fullscreen();
 
 #ifdef DOS
        regs.x.ax = 0x3;
index 9585632..4cea7e5 100644 (file)
--- a/sdl/gfx.c
+++ b/sdl/gfx.c
@@ -226,6 +226,11 @@ void fs_toggle()
                fullscreen ^= 1;
 }
 
+void exit_fullscreen()
+{
+       if (fullscreen)
+               fs_toggle();
+}
 
 void wait_vrt(int mix)
 {