mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 01:07:22 +00:00
ENGINES: Fix defaults for engines using new extended format
This fixes two issues. First of all, when I was fleshing out the Quux example engine with save support, I realised that the default savegame pattern for engines is target.***, whereas for the meta engine it was target.s**. This was causing newly created saves not to appear in the savegame list. The second is a minor convenience nicety.. if an engine is supporting the new extended format, it means they do have saves, so it's better to default to 100 slots by default without requiring the engine to explicity declare it.
This commit is contained in:
parent
fc075e29da
commit
5136ff228e
@ -47,8 +47,9 @@ const char *MetaEngine::getSavegameFile(int saveGameIdx, const char *target) con
|
||||
|
||||
const char *MetaEngine::getSavegamePattern(const char *target) const {
|
||||
static char buffer[200];
|
||||
const char *pattern = hasFeature(kSavesUseExtendedFormat) ? "%s.###" : "%s.s##";
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "%s.s##", target == nullptr ? getEngineId() : target);
|
||||
snprintf(buffer, sizeof(buffer), pattern, target == nullptr ? getEngineId() : target);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
@ -244,7 +244,8 @@ public:
|
||||
* @return maximum save slot number supported
|
||||
*/
|
||||
virtual int getMaximumSaveSlot() const {
|
||||
return 0;
|
||||
// For games using the new save format, assume 99 slots by default
|
||||
return hasFeature(kSavesUseExtendedFormat) ? 99 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user