1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-29 07:58:30 +02:00

Fix up log messages in FILESYSTEM_mountassets()

The info message when a .data.zip file is mounted is now differentiated
from the message when an actual directory is mounted (the .data.zip
message specifies ".data.zip").

The error message for an error occurring when loading or mounting a .zip
is now capitalized.

The "Custom asset directory does not exist" now uses puts(), because
there's no need to use printf() here.
This commit is contained in:
Misa 2021-02-26 18:02:58 -08:00 committed by Ethan Lee
parent c68efac032
commit c27bbaaecc

View File

@ -200,7 +200,7 @@ void FILESYSTEM_mountassets(const char* path)
}
if (cstr && FILESYSTEM_directoryExists(zippath.c_str())) {
printf("Custom asset directory exists at %s\n", zippath.c_str());
printf("Custom asset directory is .data.zip at %s\n", zippath.c_str());
FILESYSTEM_mount(zippath.c_str());
graphics.reloadresources();
FILESYSTEM_assetsmounted = true;
@ -209,9 +209,15 @@ void FILESYSTEM_mountassets(const char* path)
PHYSFS_File* zip = PHYSFS_openRead(zip_path.c_str());
zip_path += ".data.zip";
if (zip == NULL) {
printf("error loading .zip: %s\n", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
printf(
"Error loading .zip: %s\n",
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
);
} else if (PHYSFS_mountHandle(zip, zip_path.c_str(), "/", 0) == 0) {
printf("error mounting .zip: %s\n", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
printf(
"Error mounting .zip: %s\n",
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
);
} else {
graphics.assetdir = zip_path;
}
@ -223,7 +229,7 @@ void FILESYSTEM_mountassets(const char* path)
graphics.reloadresources();
FILESYSTEM_assetsmounted = true;
} else {
printf("Custom asset directory does not exist\n");
puts("Custom asset directory does not exist");
FILESYSTEM_assetsmounted = false;
}
}