#201 Don't update track/sector on disk swap

This commit is contained in:
michaelangel007 2014-07-29 07:56:55 -07:00
parent ae5d765b2c
commit 391b891807
4 changed files with 17 additions and 12 deletions

View file

@ -39,10 +39,11 @@ enum AppMode_e
#define SPEED_NORMAL 10 #define SPEED_NORMAL 10
#define SPEED_MAX 40 #define SPEED_MAX 40
#define DRAW_BACKGROUND 1 #define DRAW_BACKGROUND (1 << 0)
#define DRAW_LEDS 2 #define DRAW_LEDS (1 << 1)
#define DRAW_TITLE 4 #define DRAW_TITLE (1 << 2)
#define DRAW_BUTTON_DRIVES 8 #define DRAW_BUTTON_DRIVES (1 << 3)
#define DRAW_DISK_STATUS (1 << 4)
#define BTN_HELP 0 #define BTN_HELP 0
#define BTN_RUN 1 #define BTN_RUN 1

View file

@ -982,8 +982,7 @@ bool DiskDriveSwap(void)
Disk_SaveLastDiskImage(DRIVE_1); Disk_SaveLastDiskImage(DRIVE_1);
Disk_SaveLastDiskImage(DRIVE_2); Disk_SaveLastDiskImage(DRIVE_2);
FrameRefreshStatus(DRAW_LEDS | DRAW_BUTTON_DRIVES); FrameRefreshStatus(DRAW_LEDS | DRAW_BUTTON_DRIVES, false );
FrameDrawDiskLEDS( (HDC)0 );
return true; return true;
} }

View file

@ -538,7 +538,7 @@ static void DrawFrameWindow ()
} }
// DRAW THE STATUS AREA // 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 // DRAW THE CONTENTS OF THE EMULATED SCREEN
if (g_nAppMode == MODE_LOGO) if (g_nAppMode == MODE_LOGO)
@ -759,7 +759,8 @@ static void DrawStatusArea (HDC passdc, int drawflags)
{ {
SelectObject(dc,smallfont); SelectObject(dc,smallfont);
FrameDrawDiskStatus( dc ); if (drawflags & DRAW_DISK_STATUS)
FrameDrawDiskStatus( dc );
#if HD_LED #if HD_LED
SetTextColor(dc, g_aDiskFullScreenColorsLED[ eHardDriveStatus ] ); SetTextColor(dc, g_aDiskFullScreenColorsLED[ eHardDriveStatus ] );
@ -824,7 +825,9 @@ static void DrawStatusArea (HDC passdc, int drawflags)
if (drawflags & DRAW_LEDS) if (drawflags & DRAW_LEDS)
{ {
FrameDrawDiskLEDS( dc ); FrameDrawDiskLEDS( dc );
FrameDrawDiskStatus( dc );
if (drawflags & DRAW_DISK_STATUS)
FrameDrawDiskStatus( dc );
if (!IS_APPLE2) if (!IS_APPLE2)
{ {
@ -2346,8 +2349,10 @@ HDC FrameGetVideoDC (LPBYTE *pAddr_, LONG *pPitch_)
} }
//=========================================================================== //===========================================================================
void FrameRefreshStatus (int drawflags) { void FrameRefreshStatus (int drawflags, bool bUpdateDiskStatus) {
DrawStatusArea((HDC)0,drawflags); // 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);
} }
//=========================================================================== //===========================================================================

View file

@ -38,7 +38,7 @@
void FrameCreateWindow(void); void FrameCreateWindow(void);
HDC FrameGetDC (); HDC FrameGetDC ();
HDC FrameGetVideoDC (LPBYTE *,LONG *); HDC FrameGetVideoDC (LPBYTE *,LONG *);
void FrameRefreshStatus (int); void FrameRefreshStatus (int, bool bUpdateDiskStatus = true );
void FrameRegisterClass (); void FrameRegisterClass ();
void FrameReleaseDC (); void FrameReleaseDC ();
void FrameReleaseVideoDC (); void FrameReleaseVideoDC ();