Move interface into a class FrameBase. (PR #893)

. Move the Win32  implementation into Win32Frame.
This commit is contained in:
Andrea
2020-12-24 15:08:50 +00:00
committed by GitHub
parent 6ec47a357d
commit e27879ac99
33 changed files with 348 additions and 267 deletions
+6 -6
View File
@@ -289,7 +289,7 @@ static void ParseUnitApple2(YamlLoadHelper& yamlLoadHelper, UINT version)
// g_Apple2Type may've changed: so redraw frame (title, buttons, leds, etc)
VideoReinitialize(); // g_CharsetType changed
FrameUpdateApple2Type(); // Calls VideoRedrawScreen() before the aux mem has been loaded (so if DHGR is enabled, then aux mem will be zeros at this stage)
GetFrame().FrameUpdateApple2Type(); // Calls VideoRedrawScreen() before the aux mem has been loaded (so if DHGR is enabled, then aux mem will be zeros at this stage)
}
//---
@@ -508,7 +508,7 @@ static void Snapshot_LoadState_v2(void)
}
MB_SetCumulativeCycles();
SetLoadedSaveStateFlag(true);
GetFrame().SetLoadedSaveStateFlag(true);
// NB. The following disparity should be resolved:
// . A change in h/w via the Configuration property sheets results in a the VM completely restarting (via WM_USER_RESTART)
@@ -531,13 +531,13 @@ static void Snapshot_LoadState_v2(void)
}
catch(std::string szMessage)
{
MessageBox( g_hFrameWindow,
MessageBox( GetFrame().g_hFrameWindow,
szMessage.c_str(),
TEXT("Load State"),
MB_ICONEXCLAMATION | MB_SETFOREGROUND);
if (restart)
PostMessage(g_hFrameWindow, WM_USER_RESTART, 0, 0); // Power-cycle VM (undoing all the new state just loaded)
PostMessage(GetFrame().g_hFrameWindow, WM_USER_RESTART, 0, 0); // Power-cycle VM (undoing all the new state just loaded)
}
SetCursor(oldcursor);
@@ -550,7 +550,7 @@ void Snapshot_LoadState()
const size_t pos = g_strSaveStatePathname.size() - ext_aws.size();
if (g_strSaveStatePathname.find(ext_aws, pos) != std::string::npos) // find ".aws" at end of pathname
{
MessageBox( g_hFrameWindow,
MessageBox( GetFrame().g_hFrameWindow,
"Save-state v1 no longer supported.\n"
"Please load using AppleWin 1.27, and re-save as a v2 state file.",
TEXT("Load State"),
@@ -647,7 +647,7 @@ void Snapshot_SaveState(void)
}
catch(std::string szMessage)
{
MessageBox( g_hFrameWindow,
MessageBox( GetFrame().g_hFrameWindow,
szMessage.c_str(),
TEXT("Save State"),
MB_ICONEXCLAMATION | MB_SETFOREGROUND);