mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Move cleanup code to separate function
I will need to re-use this code, so it's best that it not be copy-pasted.
This commit is contained in:
@@ -76,6 +76,8 @@ static inline Uint32 get_framerate(const int slowdown)
|
||||
static void inline deltaloop();
|
||||
static void inline fixedloop();
|
||||
|
||||
static void cleanup();
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char* baseDir = NULL;
|
||||
@@ -357,12 +359,16 @@ int main(int argc, char *argv[])
|
||||
deltaloop();
|
||||
}
|
||||
|
||||
cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cleanup()
|
||||
{
|
||||
game.savestatsandsettings();
|
||||
NETWORK_shutdown();
|
||||
SDL_Quit();
|
||||
FILESYSTEM_deinit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void inline deltaloop()
|
||||
|
||||
Reference in New Issue
Block a user