lua - savestate.looad() - if path does not exist put a helpful error message rather than a vague .net error

This commit is contained in:
adelikat 2015-06-15 01:17:02 +00:00
parent 55b4991d8e
commit 6517178e6d
1 changed files with 8 additions and 1 deletions

View File

@ -22,7 +22,14 @@ namespace BizHawk.Client.EmuHawk
)]
public void Load(string path)
{
GlobalWin.MainForm.LoadState(path, Path.GetFileName(path), true);
if (!File.Exists(path))
{
Log(string.Format("could not find file: {0}", path));
}
else
{
GlobalWin.MainForm.LoadState(path, Path.GetFileName(path), true);
}
}
[LuaMethodAttributes(