1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-28 23:48:30 +02: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 (*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)