1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-17 16:39:42 +01:00

Print if PHYSFS_enumerate() has an error

If PHYSFS_enumerate() isn't successful, we now print that it wasn't
successful, and print the PhysFS error message. (We should get that
logging thing going sometime...)
This commit is contained in:
Misa 2021-02-18 22:19:34 -08:00 committed by Ethan Lee
parent 83976016c7
commit 72b8afcf7d

View file

@ -361,7 +361,15 @@ static PHYSFS_EnumerateCallbackResult enumerateCallback(
void FILESYSTEM_enumerateLevelDirFileNames( void FILESYSTEM_enumerateLevelDirFileNames(
void (*callback)(const char* filename) void (*callback)(const char* filename)
) { ) {
PHYSFS_enumerate("levels", enumerateCallback, (void*) callback); int success = PHYSFS_enumerate("levels", enumerateCallback, (void*) callback);
if (success == 0)
{
printf(
"Could not get list of levels: %s\n",
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
);
}
} }
static void PLATFORM_getOSDirectory(char* output) static void PLATFORM_getOSDirectory(char* output)