diff --git a/source/Common.h b/source/Common.h index 1ee2c774..19716f2b 100644 --- a/source/Common.h +++ b/source/Common.h @@ -39,10 +39,11 @@ enum AppMode_e #define SPEED_NORMAL 10 #define SPEED_MAX 40 -#define DRAW_BACKGROUND 1 -#define DRAW_LEDS 2 -#define DRAW_TITLE 4 -#define DRAW_BUTTON_DRIVES 8 +#define DRAW_BACKGROUND (1 << 0) +#define DRAW_LEDS (1 << 1) +#define DRAW_TITLE (1 << 2) +#define DRAW_BUTTON_DRIVES (1 << 3) +#define DRAW_DISK_STATUS (1 << 4) #define BTN_HELP 0 #define BTN_RUN 1 diff --git a/source/Disk.cpp b/source/Disk.cpp index 03ac43c6..2f660305 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -982,8 +982,7 @@ bool DiskDriveSwap(void) Disk_SaveLastDiskImage(DRIVE_1); Disk_SaveLastDiskImage(DRIVE_2); - FrameRefreshStatus(DRAW_LEDS | DRAW_BUTTON_DRIVES); - FrameDrawDiskLEDS( (HDC)0 ); + FrameRefreshStatus(DRAW_LEDS | DRAW_BUTTON_DRIVES, false ); return true; } diff --git a/source/Frame.cpp b/source/Frame.cpp index 96ae6493..1a3af671 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -538,7 +538,7 @@ static void DrawFrameWindow () } // DRAW THE STATUS AREA - DrawStatusArea(dc,DRAW_BACKGROUND | DRAW_LEDS); + DrawStatusArea(dc,DRAW_BACKGROUND | DRAW_LEDS | DRAW_DISK_STATUS); // DRAW THE CONTENTS OF THE EMULATED SCREEN if (g_nAppMode == MODE_LOGO) @@ -759,7 +759,8 @@ static void DrawStatusArea (HDC passdc, int drawflags) { SelectObject(dc,smallfont); - FrameDrawDiskStatus( dc ); + if (drawflags & DRAW_DISK_STATUS) + FrameDrawDiskStatus( dc ); #if HD_LED SetTextColor(dc, g_aDiskFullScreenColorsLED[ eHardDriveStatus ] ); @@ -824,7 +825,9 @@ static void DrawStatusArea (HDC passdc, int drawflags) if (drawflags & DRAW_LEDS) { FrameDrawDiskLEDS( dc ); - FrameDrawDiskStatus( dc ); + + if (drawflags & DRAW_DISK_STATUS) + FrameDrawDiskStatus( dc ); if (!IS_APPLE2) { @@ -2346,8 +2349,10 @@ HDC FrameGetVideoDC (LPBYTE *pAddr_, LONG *pPitch_) } //=========================================================================== -void FrameRefreshStatus (int drawflags) { - DrawStatusArea((HDC)0,drawflags); +void FrameRefreshStatus (int drawflags, bool bUpdateDiskStatus) { + // NB. 99% of the time we draw the disk status. On DiskDriveSwap() we don't. + drawflags |= bUpdateDiskStatus ? DRAW_DISK_STATUS : 0; + DrawStatusArea((HDC)0,drawflags); } //=========================================================================== diff --git a/source/Frame.h b/source/Frame.h index ac4d146a..d524a6ab 100644 --- a/source/Frame.h +++ b/source/Frame.h @@ -38,7 +38,7 @@ void FrameCreateWindow(void); HDC FrameGetDC (); HDC FrameGetVideoDC (LPBYTE *,LONG *); - void FrameRefreshStatus (int); + void FrameRefreshStatus (int, bool bUpdateDiskStatus = true ); void FrameRegisterClass (); void FrameReleaseDC (); void FrameReleaseVideoDC ();