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())
|
||||
{
|
||||
if (!FlushSaveRAM())
|
||||
while (true)
|
||||
{
|
||||
var msgRes = ShowMessageBox2(
|
||||
owner: null,
|
||||
"Failed flushing the game's Save RAM to your disk.\nClose without flushing Save RAM?",
|
||||
"Directory IO Error",
|
||||
if (FlushSaveRAM()) break;
|
||||
|
||||
var result = ShowMessageBox3(
|
||||
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);
|
||||
|
||||
if (!msgRes)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (result is false) break;
|
||||
if (result is null) return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue