lua - savestate.looad() - if path does not exist put a helpful error message rather than a vague .net error
This commit is contained in:
parent
55b4991d8e
commit
6517178e6d
|
@ -22,7 +22,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
)]
|
)]
|
||||||
public void Load(string path)
|
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(
|
[LuaMethodAttributes(
|
||||||
|
|
Loading…
Reference in New Issue