mirror of https://github.com/snes9xgit/snes9x.git
win32: use selected bank for slot save/load, display both slot and bank
in info string (#953)
This commit is contained in:
parent
0727b4a474
commit
72e4946410
|
@ -364,8 +364,7 @@ Nintendo is a trademark.")
|
||||||
|
|
||||||
// Save Messages
|
// Save Messages
|
||||||
|
|
||||||
#define FREEZE_INFO_SET_SLOT_N "Set save slot %03d [%s]"
|
#define FREEZE_INFO_SET_SLOT_N "Set save slot %03d, bank %03d [%s]"
|
||||||
#define FREEZE_INFO_SET_BANK_N "Set save bank %03d"
|
|
||||||
|
|
||||||
// AVI Messages
|
// AVI Messages
|
||||||
|
|
||||||
|
|
|
@ -747,7 +747,7 @@ static void ShowStatusSlotInfo()
|
||||||
if (stat(filename, &stats) == 0)
|
if (stat(filename, &stats) == 0)
|
||||||
exists = true;
|
exists = true;
|
||||||
|
|
||||||
sprintf(str, FREEZE_INFO_SET_SLOT_N, GUI.CurrentSaveSlot, exists ? "used" : "empty");
|
sprintf(str, FREEZE_INFO_SET_SLOT_N, GUI.CurrentSaveSlot, GUI.CurrentSaveBank, exists ? "used" : "empty");
|
||||||
S9xSetInfoString(str);
|
S9xSetInfoString(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,13 +885,13 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
|
||||||
if(wParam == CustomKeys.SlotSave.key
|
if(wParam == CustomKeys.SlotSave.key
|
||||||
&& modifiers == CustomKeys.SlotSave.modifiers)
|
&& modifiers == CustomKeys.SlotSave.modifiers)
|
||||||
{
|
{
|
||||||
FreezeUnfreezeSlot (GUI.CurrentSaveSlot, true);
|
FreezeUnfreezeSlot (GUI.CurrentSaveBank * SAVE_SLOTS_PER_BANK + GUI.CurrentSaveSlot, true);
|
||||||
hitHotKey = true;
|
hitHotKey = true;
|
||||||
}
|
}
|
||||||
if(wParam == CustomKeys.SlotLoad.key
|
if(wParam == CustomKeys.SlotLoad.key
|
||||||
&& modifiers == CustomKeys.SlotLoad.modifiers)
|
&& modifiers == CustomKeys.SlotLoad.modifiers)
|
||||||
{
|
{
|
||||||
FreezeUnfreezeSlot (GUI.CurrentSaveSlot, false);
|
FreezeUnfreezeSlot (GUI.CurrentSaveBank * SAVE_SLOTS_PER_BANK + GUI.CurrentSaveSlot, false);
|
||||||
hitHotKey = true;
|
hitHotKey = true;
|
||||||
}
|
}
|
||||||
if(wParam == CustomKeys.DialogSave.key
|
if(wParam == CustomKeys.DialogSave.key
|
||||||
|
@ -935,9 +935,7 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
|
||||||
if (GUI.CurrentSaveBank > LAST_SAVE_BANK)
|
if (GUI.CurrentSaveBank > LAST_SAVE_BANK)
|
||||||
GUI.CurrentSaveBank = 0;
|
GUI.CurrentSaveBank = 0;
|
||||||
|
|
||||||
static char str[64];
|
ShowStatusSlotInfo();
|
||||||
sprintf(str, FREEZE_INFO_SET_BANK_N, GUI.CurrentSaveBank);
|
|
||||||
S9xSetInfoString(str);
|
|
||||||
|
|
||||||
hitHotKey = true;
|
hitHotKey = true;
|
||||||
}
|
}
|
||||||
|
@ -948,9 +946,7 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
|
||||||
if (GUI.CurrentSaveBank < 0)
|
if (GUI.CurrentSaveBank < 0)
|
||||||
GUI.CurrentSaveBank = 9;
|
GUI.CurrentSaveBank = 9;
|
||||||
|
|
||||||
static char str[64];
|
ShowStatusSlotInfo();
|
||||||
sprintf(str, FREEZE_INFO_SET_BANK_N, GUI.CurrentSaveBank);
|
|
||||||
S9xSetInfoString(str);
|
|
||||||
|
|
||||||
hitHotKey = true;
|
hitHotKey = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue