Save config before SDL_Quit
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Fri, 30 Oct 2009 16:37:44 +0000 (16:37 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Fri, 30 Oct 2009 16:37:44 +0000 (16:37 +0000)
Using SDL_GetKeyName after SDL_Quit is REALLY asking for trouble.

git-svn-id: https://s.snth.net/svn/neverball/trunk@3102 78b8d119-cf0a-0410-b17c-f493084dd1d7

ball/main.c

index 5fac1e0..7de5112 100644 (file)
@@ -484,7 +484,7 @@ int main(int argc, char *argv[])
             SDL_Delay(1);
     }
 
-    /* Gracefully close the game */
+    config_save();
 
     if (joy)
         SDL_JoystickClose(joy);
@@ -492,8 +492,6 @@ int main(int argc, char *argv[])
     tilt_free();
     SDL_Quit();
 
-    config_save();
-
     return 0;
 }