Prepare for adjustable save state slot count by making the Win32 menu dynamic

This commit is contained in:
Henrik Rydgård committed 2026-01-08 16:07:48 +01:00
1 parent a9ef2baa5e
commit 77b9a6e2e8
53 files changed
+97 -45

No files matched your search

+4 -4
View File
@@ -554,12 +554,12 @@ double g_lastSaveTime = -1.0;
void PrevSlot()
{
g_Config.iCurrentStateSlot = (g_Config.iCurrentStateSlot - 1 + NUM_SLOTS) % NUM_SLOTS;
g_Config.iCurrentStateSlot = (g_Config.iCurrentStateSlot - 1 + Config::iSaveStateSlotCount) % Config::iSaveStateSlotCount;
}
void NextSlot()
{
g_Config.iCurrentStateSlot = (g_Config.iCurrentStateSlot + 1) % NUM_SLOTS;
g_Config.iCurrentStateSlot = (g_Config.iCurrentStateSlot + 1) % Config::iSaveStateSlotCount;
}
static void DeleteIfExists(const Path &fn) {
@@ -807,7 +807,7 @@ double g_lastSaveTime = -1.0;
int GetNewestSlot(const Path &gameFilename) {
int newestSlot = -1;
tm newestDate = {0};
for (int i = 0; i < NUM_SLOTS; i++) {
for (int i = 0; i < Config::iSaveStateSlotCount; i++) {
Path fn = GenerateSaveSlotFilename(gameFilename, i, STATE_EXTENSION);
if (File::Exists(fn)) {
tm time;
@@ -824,7 +824,7 @@ double g_lastSaveTime = -1.0;
int GetOldestSlot(const Path &gameFilename) {
int oldestSlot = -1;
tm oldestDate = {0};
for (int i = 0; i < NUM_SLOTS; i++) {
for (int i = 0; i < Config::iSaveStateSlotCount; i++) {
Path fn = GenerateSaveSlotFilename(gameFilename, i, STATE_EXTENSION);
if (File::Exists(fn)) {
tm time;