diff options
-rw-r--r-- | gui/saveload.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 41b6018e3b..9e3c9231f2 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -362,8 +362,19 @@ void SaveLoadChooser::updateSaveList() { } // Fill the rest of the save slots with empty saves + + int maximumSaveSlots = (*_plugin)->getMaximumSaveSlot(); + +#ifdef __DS__ + // Low memory on the DS means too many save slots are impractical, so limit + // the maximum here. + if (maximumSaveSlots > 99) { + maximumSaveSlots = 99; + } +#endif + Common::String emptyDesc; - for (int i = curSlot; i <= (*_plugin)->getMaximumSaveSlot(); i++) { + for (int i = curSlot; i <= maximumSaveSlots; i++) { saveNames.push_back(emptyDesc); SaveStateDescriptor dummySave(i, ""); _saveList.push_back(dummySave); |