From: Toni Wilen Date: Sun, 19 Apr 2020 14:54:27 +0000 (+0300) Subject: Include floppy write protected state, not yet used. X-Git-Tag: 4400~66 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=4b19ecdd5dc7d7e7638a4b89712467d05c22793e;p=francis%2Fwinuae.git Include floppy write protected state, not yet used. --- diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 11ea0856..c0973756 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -2920,7 +2920,7 @@ static LRESULT CALLBACK MainWindowProc (HWND hWnd, UINT message, WPARAM wParam, tflags = txt[_tcslen (txt) + 1]; SetBkMode (lpDIS->hDC, TRANSPARENT); if ((tflags & 2) == 0) - tflags &= ~(4 | 8 | 16); + tflags &= ~(4 | 8 | 16 | 32); if (tflags & 4) { oc = SetTextColor (lpDIS->hDC, RGB(0xcc, 0x00, 0x00)); // writing } else if (tflags & 8) { @@ -2928,6 +2928,9 @@ static LRESULT CALLBACK MainWindowProc (HWND hWnd, UINT message, WPARAM wParam, } else { oc = SetTextColor (lpDIS->hDC, GetSysColor ((tflags & 2) ? COLOR_BTNTEXT : COLOR_GRAYTEXT)); } + if (tflags & 32) { + ; + } flags = DT_VCENTER | DT_SINGLELINE; if (tflags & 1) { flags |= DT_CENTER; diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 3778f80c..78205b85 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -22168,6 +22168,7 @@ void gui_led (int led, int on, int brightness) TCHAR *ptr, *tt, *p; int pos = -1, j; int writing = 0, playing = 0, active2 = 0; + int writeprotected = 0; int center = 0; indicator_leds (led, on); @@ -22209,6 +22210,8 @@ void gui_led (int led, int on, int brightness) center = 1; if (gui_data.drives[led - 1].drive_writing) writing = 1; + if (gui_data.drives[led - 1].floppy_protected) + writeprotected = 1; } else if (led == LED_POWER) { pos = 3; ptr = _tcscpy(drive_text + pos * LED_STRING_WIDTH, _T("Power")); @@ -22329,19 +22332,21 @@ void gui_led (int led, int on, int brightness) type = SBT_OWNERDRAW; if (pos >= 0) { - ptr[_tcslen (ptr) + 1] = 0; + ptr[_tcslen(ptr) + 1] = 0; if (center) - ptr[_tcslen (ptr) + 1] |= 1; + ptr[_tcslen(ptr) + 1] |= 1; if (on) { - ptr[_tcslen (ptr) + 1] |= 2; + ptr[_tcslen(ptr) + 1] |= 2; type |= SBT_POPOUT; } if (writing) - ptr[_tcslen (ptr) + 1] |= 4; + ptr[_tcslen(ptr) + 1] |= 4; if (playing) - ptr[_tcslen (ptr) + 1] |= 8; + ptr[_tcslen(ptr) + 1] |= 8; if (active2) - ptr[_tcslen (ptr) + 1] |= 16; + ptr[_tcslen(ptr) + 1] |= 16; + if (writeprotected) + ptr[_tcslen(ptr) + 1] |= 32; pos += window_led_joy_start; PostMessage(mon->hStatusWnd, SB_SETTEXT, (WPARAM)((pos + 1) | type), (LPARAM)ptr); if (tt != NULL)