don't crash when fail to save state due to IOException
This commit is contained in:
parent
a25c6b4665
commit
e09e10d90c
|
@ -2415,10 +2415,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void SaveState(string path, string userFriendlyStateName, bool fromLua)
|
public void SaveState(string path, string userFriendlyStateName, bool fromLua)
|
||||||
{
|
{
|
||||||
SavestateManager.SaveStateFile(path, userFriendlyStateName);
|
try
|
||||||
|
{
|
||||||
GlobalWin.OSD.AddMessage("Saved state: " + userFriendlyStateName);
|
SavestateManager.SaveStateFile(path, userFriendlyStateName);
|
||||||
|
|
||||||
|
GlobalWin.OSD.AddMessage("Saved state: " + userFriendlyStateName);
|
||||||
|
}
|
||||||
|
catch (IOException)
|
||||||
|
{
|
||||||
|
GlobalWin.OSD.AddMessage("Unable to save state " + path);
|
||||||
|
}
|
||||||
if (!fromLua)
|
if (!fromLua)
|
||||||
{
|
{
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
|
|
Loading…
Reference in New Issue