Fix `FileNotFoundException` thrown from quickslot preview
fixes 1db54108a
This commit is contained in:
parent
1db54108ac
commit
7d951c6a3d
|
@ -4248,9 +4248,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
public BitmapBuffer/*?*/ ReadScreenshotFromSavestate(int slot)
|
public BitmapBuffer/*?*/ ReadScreenshotFromSavestate(int slot)
|
||||||
=> Emulator.HasSavestates()
|
{
|
||||||
? SavestateFile.GetFrameBufferFrom($"{SaveStatePrefix()}.QuickSave{slot % 10}.State")
|
if (!Emulator.HasSavestates()) return false;
|
||||||
: null;
|
var path = $"{SaveStatePrefix()}.QuickSave{slot % 10}.State";
|
||||||
|
return File.Exists(path) ? SavestateFile.GetFrameBufferFrom(path) : null;
|
||||||
|
}
|
||||||
|
|
||||||
public bool LoadState(string path, string userFriendlyStateName, bool suppressOSD = false) // Move to client.common
|
public bool LoadState(string path, string userFriendlyStateName, bool suppressOSD = false) // Move to client.common
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue