exit fullscreen mode early to avoid crashbug/exit-fullscreen-mode
authorAnsgar Burchardt <ansgar-guest@alioth.debian.org>
Sat, 13 Dec 2008 13:33:50 +0000 (13 14:33 +0100)
committerAnsgar Burchardt <ansgar-guest@alioth.debian.org>
Sat, 13 Dec 2008 13:33:50 +0000 (13 14:33 +0100)
Jump'n'bump would crash when leaving the game from fullscreen mode and
sound was available.  This patch makes Jump'n'bump exit fullscreen
mode early.

see http://bugs.debian.org/432361

main.c

diff --git a/main.c b/main.c
index 76c9463..2db1f18 100644 (file)
--- a/main.c
+++ b/main.c
@@ -3324,6 +3324,8 @@ void deinit_program(void)
        __dpmi_regs regs;
 #endif
 
+       exit_fullscreen();
+
        dj_stop();
        dj_free_mod(MOD_MENU);
        dj_free_mod(MOD_GAME);
@@ -3338,7 +3340,6 @@ void deinit_program(void)
                free(mask_pic);
 
        remove_keyb_handler();
-       exit_fullscreen();
 
 #ifdef DOS
        regs.x.ax = 0x3;