Check HasSavestates() on some hotkeys
This commit is contained in:
parent
2fce719309
commit
2bd45e653c
|
@ -1485,9 +1485,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void SelectSlot(int num)
|
private void SelectSlot(int num)
|
||||||
{
|
{
|
||||||
Global.Config.SaveSlot = num;
|
if (Global.Emulator.HasSavestates())
|
||||||
SaveSlotSelectedMessage();
|
{
|
||||||
UpdateStatusSlots();
|
Global.Config.SaveSlot = num;
|
||||||
|
SaveSlotSelectedMessage();
|
||||||
|
UpdateStatusSlots();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RewireSound()
|
private void RewireSound()
|
||||||
|
@ -2013,40 +2016,46 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void PreviousSlot()
|
private void PreviousSlot()
|
||||||
{
|
{
|
||||||
if (Global.Config.SaveSlot == 0)
|
if (Global.Emulator.HasSavestates())
|
||||||
{
|
{
|
||||||
Global.Config.SaveSlot = 9; // Wrap to end of slot list
|
if (Global.Config.SaveSlot == 0)
|
||||||
}
|
{
|
||||||
else if (Global.Config.SaveSlot > 9)
|
Global.Config.SaveSlot = 9; // Wrap to end of slot list
|
||||||
{
|
}
|
||||||
Global.Config.SaveSlot = 9; // Meh, just in case
|
else if (Global.Config.SaveSlot > 9)
|
||||||
}
|
{
|
||||||
else
|
Global.Config.SaveSlot = 9; // Meh, just in case
|
||||||
{
|
}
|
||||||
Global.Config.SaveSlot--;
|
else
|
||||||
}
|
{
|
||||||
|
Global.Config.SaveSlot--;
|
||||||
|
}
|
||||||
|
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NextSlot()
|
private void NextSlot()
|
||||||
{
|
{
|
||||||
if (Global.Config.SaveSlot >= 9)
|
if (Global.Emulator.HasSavestates())
|
||||||
{
|
{
|
||||||
Global.Config.SaveSlot = 0; // Wrap to beginning of slot list
|
if (Global.Config.SaveSlot >= 9)
|
||||||
}
|
{
|
||||||
else if (Global.Config.SaveSlot < 0)
|
Global.Config.SaveSlot = 0; // Wrap to beginning of slot list
|
||||||
{
|
}
|
||||||
Global.Config.SaveSlot = 0; // Meh, just in case
|
else if (Global.Config.SaveSlot < 0)
|
||||||
}
|
{
|
||||||
else
|
Global.Config.SaveSlot = 0; // Meh, just in case
|
||||||
{
|
}
|
||||||
Global.Config.SaveSlot++;
|
else
|
||||||
}
|
{
|
||||||
|
Global.Config.SaveSlot++;
|
||||||
|
}
|
||||||
|
|
||||||
SaveSlotSelectedMessage();
|
SaveSlotSelectedMessage();
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ToggleFPS()
|
private static void ToggleFPS()
|
||||||
|
|
Loading…
Reference in New Issue