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:
Misa
2022-03-14 10:45:19 -07:00
parent a168f73a67
commit 84279354e5
3 changed files with 10 additions and 1 deletions

View File

@@ -186,6 +186,11 @@ int FILESYSTEM_init(char *argvZero, char* baseDir, char *assetsPath)
return 1;
}
bool FILESYSTEM_isInit(void)
{
return isInit;
}
static unsigned char* stdin_buffer = NULL;
static size_t stdin_length = 0;