refactor saveram saving error handling in CloseGame
The previous code did nothing when a new rom was loaded or the emulator was closed. Now the user at least gets the chance to try again, however much that will help.
This commit is contained in:
parent
1b7e858977
commit
18c29ca57c
|
@ -4102,18 +4102,19 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
else if (Emulator.HasSaveRam())
|
else if (Emulator.HasSaveRam())
|
||||||
{
|
{
|
||||||
if (!FlushSaveRAM())
|
while (true)
|
||||||
{
|
{
|
||||||
var msgRes = ShowMessageBox2(
|
if (FlushSaveRAM()) break;
|
||||||
owner: null,
|
|
||||||
"Failed flushing the game's Save RAM to your disk.\nClose without flushing Save RAM?",
|
var result = ShowMessageBox3(
|
||||||
"Directory IO Error",
|
owner: this,
|
||||||
|
"Failed flushing the game's Save RAM to your disk.\n" +
|
||||||
|
"Do you want to try again?",
|
||||||
|
"IOError while writing SaveRAM",
|
||||||
EMsgBoxIcon.Error);
|
EMsgBoxIcon.Error);
|
||||||
|
|
||||||
if (!msgRes)
|
if (result is false) break;
|
||||||
{
|
if (result is null) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue