mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-25 10:14:58 +01:00
Contextualize PHYSFS_mountHandle() failure output
If PHYSFS_mountHandle() failed to mount a zip file, we would print PhysFS's error message straight, without any surrounding context. This seems a little weird, and doesn't maximize understanding for readers; I've made it so now the error message is "Could not mount <zip file>: <PhysFS error>".
This commit is contained in:
parent
f22691c32a
commit
532dbee4fd
1 changed files with 5 additions and 1 deletions
|
@ -87,7 +87,11 @@ void editorclass::loadZips()
|
||||||
if (endsWith(directoryList[i], ".zip")) {
|
if (endsWith(directoryList[i], ".zip")) {
|
||||||
PHYSFS_File* zip = PHYSFS_openRead(directoryList[i].c_str());
|
PHYSFS_File* zip = PHYSFS_openRead(directoryList[i].c_str());
|
||||||
if (!PHYSFS_mountHandle(zip, directoryList[i].c_str(), "levels", 1)) {
|
if (!PHYSFS_mountHandle(zip, directoryList[i].c_str(), "levels", 1)) {
|
||||||
printf("%s\n", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
|
printf(
|
||||||
|
"Could not mount %s: %s\n",
|
||||||
|
filename_.c_str(),
|
||||||
|
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
needsReload = true;
|
needsReload = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue