FrameBase: some changes to ease implementations (PR #910)

. simplify the interface FrameBase to make it easier to implement it for different cases (remove HDC and make parameters more explicit)
. remove functions which are only called on a Win32Frame (in which case a cast is guaranteed to succeed)
. otherwise there is the risk that every FrameBase implementation wants to add its own variants.
. FrameBase::FrameRefreshStatus() simplify implementation: pass all flags explicitly
This commit is contained in:
Andrea
2021-01-10 16:33:06 +00:00
committed by GitHub
parent 159cde7d64
commit 6cffb30330
16 changed files with 292 additions and 239 deletions
+4 -4
View File
@@ -417,7 +417,7 @@ BOOL HD_Insert(const int iDrive, const std::string & pszImageFilename)
if (!strcmp(pszOtherPathname.c_str(), szCurrentPathname))
{
HD_Unplug(!iDrive);
GetFrame().FrameRefreshStatus(DRAW_LEDS);
GetFrame().FrameRefreshStatus(DRAW_LEDS | DRAW_DISK_STATUS);
}
}
@@ -711,7 +711,7 @@ static BYTE __stdcall HD_IO_EMUL(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG
if( pHDD->hd_status_prev != pHDD->hd_status_next ) // Update LEDs if state changes
{
pHDD->hd_status_prev = pHDD->hd_status_next;
GetFrame().FrameRefreshStatus(DRAW_LEDS);
GetFrame().FrameRefreshStatus(DRAW_LEDS | DRAW_DISK_STATUS);
}
#endif
@@ -740,7 +740,7 @@ bool HD_ImageSwap(void)
HD_SaveLastDiskImage(HARDDISK_1);
HD_SaveLastDiskImage(HARDDISK_2);
GetFrame().FrameRefreshStatus(DRAW_LEDS, false);
GetFrame().FrameRefreshStatus(DRAW_LEDS);
return true;
}
@@ -900,7 +900,7 @@ bool HD_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version, co
HD_SetEnabled(true);
GetFrame().FrameRefreshStatus(DRAW_LEDS);
GetFrame().FrameRefreshStatus(DRAW_LEDS | DRAW_DISK_STATUS);
return true;
}