mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Clean up all program close paths to use VVV_exit()
Wow, there are a lot of these. All of these exit paths now use VVV_exit() instead, which attempts to save unlock.vvv and settings.vvv, and also frees all resources so Valgrind is happy. This is a good thing, because previously unlock.vvv/settings.vvv wouldn't be written to if we decided to bail for a given reason.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "editor.h"
|
||||
#include "Entity.h"
|
||||
#include "Enums.h"
|
||||
#include "Exit.h"
|
||||
#include "Graphics.h"
|
||||
#include "KeyPoll.h"
|
||||
#include "Map.h"
|
||||
@@ -3396,10 +3397,7 @@ void scriptclass::startgamemode( int t )
|
||||
}
|
||||
#endif
|
||||
case 100:
|
||||
game.savestatsandsettings();
|
||||
|
||||
SDL_Quit();
|
||||
exit(0);
|
||||
VVV_exit(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user