SCI32: Remove backslashes from PQ:SWAT extra save game files
The original interpreter created subdirectories for each in-game profile, but copying this behaviour would add a lot of superfluous complexity to the save game system in ScummVM, and may not be portable to all supported platforms. Instead, when the game tries to save its files to a subdirectory, the backslash in the file name is replaced with an underscore so it can be created successfully on filesystems where backslash is an illegal file name character. This has a side-effect of causing all save games to be displayed under all profiles, instead of just the ones "belonging" to a particular profile, but this seems like a reasonable trade-off given that there is no reason to play this game with more than one profile.
This commit is contained in:
parent
4eecd48c64
commit
e00c773d95
1 changed files with 7 additions and 0 deletions
|
@ -427,6 +427,13 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) {
|
|||
return make_reg(0, handle);
|
||||
}
|
||||
}
|
||||
} else if (g_sci->getGameId() == GID_PQSWAT) {
|
||||
// PQSWAT tries to create subdirectories for each game profile
|
||||
for (Common::String::iterator it = name.begin(); it != name.end(); ++it) {
|
||||
if (*it == '\\') {
|
||||
*it = '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// See kMakeSaveCatName
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue