Fixed: Full Screen Drive LEDs not displaying for Read-Only.
This commit is contained in:
parent
199d5ddd39
commit
121e14936e
1 changed files with 51 additions and 13 deletions
|
@ -58,7 +58,19 @@ static HBITMAP capsbitmapP8[2];
|
|||
static HBITMAP latbitmap[2];
|
||||
//static HBITMAP charsetbitmap [4]; //The idea was to add a charset indicator on the front panel, but it was given up. All charsetbitmap occurences must be REMOVED!
|
||||
//===========================
|
||||
static HBITMAP diskbitmap[ NUM_DISK_STATUS ];
|
||||
static HBITMAP g_hDiskWindowedLED[ NUM_DISK_STATUS ];
|
||||
|
||||
//static HBITMAP g_hDiskFullScreenLED[ NUM_DISK_STATUS ];
|
||||
|
||||
// Must keep in sync with Disk_Status_e g_aDiskFullScreenColors
|
||||
static DWORD g_aDiskFullScreenColorsLED[ NUM_DISK_STATUS ] =
|
||||
{
|
||||
RGB( 0, 0, 0), // DISK_STATUS_OFF BLACK
|
||||
RGB( 0,255, 0), // DISK_STATUS_READ GREEN
|
||||
RGB(255, 0, 0), // DISK_STATUS_WRITE RED
|
||||
RGB(255,128, 0) // DISK_STATUS_PROT ORANGE
|
||||
// RGB( 0, 0,255) // DISK_STATUS_PROT -blue-
|
||||
};
|
||||
|
||||
static HBITMAP buttonbitmap[BUTTONS];
|
||||
|
||||
|
@ -206,10 +218,16 @@ switch (g_Apple2Type)
|
|||
charsetbitmap[3] = (HBITMAP)LOADBUTTONBITMAP(TEXT("CHARSET_8M_BITMAP"));
|
||||
*/
|
||||
//===========================
|
||||
diskbitmap[ DISK_STATUS_OFF ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKOFF_BITMAP"));
|
||||
diskbitmap[ DISK_STATUS_READ ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKREAD_BITMAP"));
|
||||
diskbitmap[ DISK_STATUS_WRITE] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKWRITE_BITMAP"));
|
||||
diskbitmap[ DISK_STATUS_PROT ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKPROT_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_OFF ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKOFF_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_READ ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKREAD_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_WRITE] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKWRITE_BITMAP"));
|
||||
g_hDiskWindowedLED[ DISK_STATUS_PROT ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISKPROT_BITMAP"));
|
||||
|
||||
// Full Screen Drive LED
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_OFF ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_O")); // Full Screen Off
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_READ ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_R")); // Full Screen Read Only
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_WRITE] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_W")); // Full Screen Write
|
||||
// g_hDiskFullScreenLED[ DISK_STATUS_PROT ] = (HBITMAP)LOADBUTTONBITMAP(TEXT("DISK_FULLSCREEN_P")); // Full Screen Write Protected
|
||||
|
||||
btnfacebrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
|
||||
btnfacepen = CreatePen(PS_SOLID,1,GetSysColor(COLOR_BTNFACE));
|
||||
|
@ -229,7 +247,10 @@ static void DeleteGdiObjects () {
|
|||
for (loop = 0; loop < 2; loop++)
|
||||
DeleteObject(capsbitmap[loop]);
|
||||
for (loop = 0; loop < NUM_DISK_STATUS; loop++)
|
||||
DeleteObject(diskbitmap[loop]);
|
||||
{
|
||||
DeleteObject(g_hDiskWindowedLED[loop]);
|
||||
//DeleteObject(g_hDiskFullScreenLED[loop]);
|
||||
}
|
||||
DeleteObject(btnfacebrush);
|
||||
DeleteObject(btnfacepen);
|
||||
DeleteObject(btnhighlightpen);
|
||||
|
@ -444,10 +465,25 @@ static void DrawStatusArea (HDC passdc, int drawflags)
|
|||
SetBkMode(dc,OPAQUE);
|
||||
SetBkColor(dc,RGB(0,0,0));
|
||||
SetTextAlign(dc,TA_LEFT | TA_TOP);
|
||||
SetTextColor(dc,RGB((iDrive1Status==2 ? 255 : 0),(iDrive1Status==1 ? 255 : 0),0));
|
||||
|
||||
SetTextColor(dc, g_aDiskFullScreenColorsLED[ iDrive1Status ] );
|
||||
TextOut(dc,x+ 3,y+2,TEXT("1"),1);
|
||||
SetTextColor(dc,RGB((iDrive2Status==2 ? 255 : 0),(iDrive2Status==1 ? 255 : 0),0));
|
||||
|
||||
SetTextColor(dc, g_aDiskFullScreenColorsLED[ iDrive2Status ] );
|
||||
TextOut(dc,x+13,y+2,TEXT("2"),1);
|
||||
|
||||
// Feature Request #3581 ] drive lights in full screen mode
|
||||
// Full Screen Drive LED
|
||||
// Note: Made redundant with above code
|
||||
// RECT rect = {0,0,8,8};
|
||||
// CONST int DriveLedY = 12; // 8 in windowed mode
|
||||
// DrawBitmapRect(dc,x+12,y+DriveLedY,&rect,g_hDiskFullScreenLED[ iDrive1Status ]);
|
||||
// DrawBitmapRect(dc,x+30,y+DriveLedY,&rect,g_hDiskFullScreenLED[ iDrive2Status ]);
|
||||
// SetTextColor(dc, g_aDiskFullScreenColors[ iDrive1Status ] );
|
||||
// TextOut(dc,x+ 10,y+2,TEXT("*"),1);
|
||||
// SetTextColor(dc, g_aDiskFullScreenColors[ iDrive2Status ] );
|
||||
// TextOut(dc,x+ 20,y+2,TEXT("*"),1);
|
||||
|
||||
if (!IS_APPLE2)
|
||||
{
|
||||
SetTextAlign(dc,TA_RIGHT | TA_TOP);
|
||||
|
@ -463,6 +499,7 @@ static void DrawStatusArea (HDC passdc, int drawflags)
|
|||
TextOut(dc,x+BUTTONCX/2,y+13,(g_nAppMode == MODE_PAUSED
|
||||
? TITLE_PAUSED
|
||||
: TITLE_STEPPING) ,8);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -482,8 +519,8 @@ static void DrawStatusArea (HDC passdc, int drawflags)
|
|||
if (drawflags & DRAW_LEDS)
|
||||
{
|
||||
RECT rect = {0,0,8,8};
|
||||
DrawBitmapRect(dc,x+12,y+8,&rect,diskbitmap[iDrive1Status]);
|
||||
DrawBitmapRect(dc,x+30,y+8,&rect,diskbitmap[iDrive2Status]);
|
||||
DrawBitmapRect(dc,x+12,y+8,&rect,g_hDiskWindowedLED[iDrive1Status]);
|
||||
DrawBitmapRect(dc,x+30,y+8,&rect,g_hDiskWindowedLED[iDrive2Status]);
|
||||
|
||||
if (!IS_APPLE2)
|
||||
{
|
||||
|
@ -505,11 +542,12 @@ static void DrawStatusArea (HDC passdc, int drawflags)
|
|||
}
|
||||
|
||||
|
||||
/* if (g_Apple2Type == A2TYPE_PRAVETS8A)
|
||||
/*
|
||||
if (g_Apple2Type == A2TYPE_PRAVETS8A)
|
||||
DrawBitmapRect(dc,x+7,y+19,&rect,cyrbitmap[bCaps != 0]);
|
||||
else
|
||||
DrawBitmapRect(dc,x+7,y+19,&rect,capsbitmap[bCaps != 0]);
|
||||
*/
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue