mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
cleanup: Don't savestatsandsettings if filesystem not init
This isn't necessary, but it does silence these annoying logs if you
pass an invalid argument or don't have data.zip:
[ERROR] Could not get window size: Invalid renderer
[WARN] Stats not loaded! Not writing unlock.vvv.
[ERROR] Could not get window size: Invalid renderer
[WARN] Settings not loaded! Not writing settings.vvv.
To do this, I've added FILESYSTEM_isInit().
This commit is contained in:
@@ -697,7 +697,10 @@ int main(int argc, char *argv[])
|
||||
static void cleanup(void)
|
||||
{
|
||||
/* Order matters! */
|
||||
game.savestatsandsettings();
|
||||
if (FILESYSTEM_isInit()) /* not necessary but silences logs */
|
||||
{
|
||||
game.savestatsandsettings();
|
||||
}
|
||||
gameScreen.destroy();
|
||||
graphics.grphx.destroy();
|
||||
graphics.destroy_buffers();
|
||||
|
||||
Reference in New Issue
Block a user