ENGINES: Fix savegame filename format for new-type saves

This also fixes a problem with the Griffin engine, which
although it was using the new type saves, was using a
target.s?? format, so wasn't listing files in the GMM
save dialog
This commit is contained in:
Paul Gilbert 2020-09-18 21:19:32 -07:00
parent 8f15f529d8
commit 05620460e0
2 changed files with 19 additions and 1 deletions

View file

@ -39,8 +39,9 @@
const char *MetaEngine::getSavegameFile(int saveGameIdx, const char *target) const {
static char buffer[200];
const char *pattern = hasFeature(kSavesUseExtendedFormat) ? "%s.%03d" : "%s.s%02d";
snprintf(buffer, sizeof(buffer), "%s.s%02d", target == nullptr ? getEngineId() : target, saveGameIdx);
snprintf(buffer, sizeof(buffer), pattern, target == nullptr ? getEngineId() : target, saveGameIdx);
return buffer;
}