mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01: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:
parent
c68efac032
commit
c27bbaaecc
1 changed files with 10 additions and 4 deletions
|
@ -200,7 +200,7 @@ void FILESYSTEM_mountassets(const char* path)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cstr && FILESYSTEM_directoryExists(zippath.c_str())) {
|
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());
|
FILESYSTEM_mount(zippath.c_str());
|
||||||
graphics.reloadresources();
|
graphics.reloadresources();
|
||||||
FILESYSTEM_assetsmounted = true;
|
FILESYSTEM_assetsmounted = true;
|
||||||
|
@ -209,9 +209,15 @@ void FILESYSTEM_mountassets(const char* path)
|
||||||
PHYSFS_File* zip = PHYSFS_openRead(zip_path.c_str());
|
PHYSFS_File* zip = PHYSFS_openRead(zip_path.c_str());
|
||||||
zip_path += ".data.zip";
|
zip_path += ".data.zip";
|
||||||
if (zip == NULL) {
|
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) {
|
} 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 {
|
} else {
|
||||||
graphics.assetdir = zip_path;
|
graphics.assetdir = zip_path;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +229,7 @@ void FILESYSTEM_mountassets(const char* path)
|
||||||
graphics.reloadresources();
|
graphics.reloadresources();
|
||||||
FILESYSTEM_assetsmounted = true;
|
FILESYSTEM_assetsmounted = true;
|
||||||
} else {
|
} else {
|
||||||
printf("Custom asset directory does not exist\n");
|
puts("Custom asset directory does not exist");
|
||||||
FILESYSTEM_assetsmounted = false;
|
FILESYSTEM_assetsmounted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue