check HasSavestates() on some save and loadstate calls that can be accessed via lua (and other stuff)
This commit is contained in:
parent
65249ad0f9
commit
70a9b535f5
|
@ -2492,6 +2492,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void LoadState(string path, string userFriendlyStateName, bool fromLua = false) // Move to client.common
|
public void LoadState(string path, string userFriendlyStateName, bool fromLua = false) // Move to client.common
|
||||||
{
|
{
|
||||||
|
if (!Global.Emulator.HasSavestates())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If from lua, disable counting rerecords
|
// If from lua, disable counting rerecords
|
||||||
bool wasCountingRerecords = Global.MovieSession.Movie.IsCountingRerecords;
|
bool wasCountingRerecords = Global.MovieSession.Movie.IsCountingRerecords;
|
||||||
|
|
||||||
|
@ -2525,7 +2530,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void LoadQuickSave(string quickSlotName, bool fromLua = false)
|
public void LoadQuickSave(string quickSlotName, bool fromLua = false)
|
||||||
{
|
{
|
||||||
if (Global.Emulator.IsNull())
|
if (!Global.Emulator.HasSavestates())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2542,6 +2547,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void SaveState(string path, string userFriendlyStateName, bool fromLua)
|
public void SaveState(string path, string userFriendlyStateName, bool fromLua)
|
||||||
{
|
{
|
||||||
|
if (!Global.Emulator.HasSavestates())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SavestateManager.SaveStateFile(path, userFriendlyStateName);
|
SavestateManager.SaveStateFile(path, userFriendlyStateName);
|
||||||
|
@ -3362,7 +3372,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// TODO: should backup logic be stuffed in into Client.Common.SaveStateManager?
|
// TODO: should backup logic be stuffed in into Client.Common.SaveStateManager?
|
||||||
public void SaveQuickSave(string quickSlotName)
|
public void SaveQuickSave(string quickSlotName)
|
||||||
{
|
{
|
||||||
if (Global.Emulator.IsNull())
|
if (!Global.Emulator.HasSavestates())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue