mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-10 13:29:56 +00:00
Save-state: Do not reset on minor state load errors (PR #623)
This commit is contained in:
parent
8589ad2510
commit
11137cbc44
@ -358,13 +358,28 @@ static void Snapshot_LoadState_v2(void)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::string err_msg = "";
|
||||
int res = yamlHelper.InitParser( g_strSaveStatePathname.c_str() );
|
||||
if (!res)
|
||||
throw std::string("Failed to initialize parser or open file"); // TODO: disambiguate
|
||||
{
|
||||
err_msg = "Failed to initialize parser or open file";
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT version = ParseFileHdr();
|
||||
if (version != SS_FILE_VER)
|
||||
err_msg = "Version mismatch";
|
||||
}
|
||||
|
||||
UINT version = ParseFileHdr();
|
||||
if (version != SS_FILE_VER)
|
||||
throw std::string("Version mismatch");
|
||||
if (err_msg != "")
|
||||
{
|
||||
MessageBox(g_hFrameWindow,
|
||||
err_msg.c_str(),
|
||||
TEXT("Load State"),
|
||||
MB_ICONEXCLAMATION | MB_SETFOREGROUND);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user