]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
CD Quickstart eject button was always disabled. NV led updates.
authorToni Wilen <twilen@winuae.net>
Mon, 8 Sep 2014 14:47:38 +0000 (17:47 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 8 Sep 2014 14:47:38 +0000 (17:47 +0300)
main.cpp
od-win32/win32gfx.cpp
od-win32/win32gui.cpp

index 660d32d199fbae0886cc08201244043fe3dc84fd..4f84ea93944be0c3af5eccfc1133eb048f7ef504 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1157,7 +1157,7 @@ static int real_main2 (int argc, TCHAR **argv)
        memset (&gui_data, 0, sizeof gui_data);
        gui_data.cd = -1;
        gui_data.hd = -1;
-       gui_data.md = -1;
+       gui_data.md = (currprefs.cs_cd32nvram || currprefs.cs_cdtvram) ? 0 : -1;
        logging_init (); /* Yes, we call this twice - the first case handles when the user has loaded
                                                 a config using the cmd-line.  This case handles loads through the GUI. */
 
index 5c414b035f4b0d29cab2155aef58626e9c50c677..ce21e17b087424791b3b653528785c1bed427808 100644 (file)
@@ -1745,6 +1745,8 @@ static int open_windows (bool mousecapture)
                        gui_flicker_led (i, -1, -1);
                gui_led (LED_POWER, gui_data.powerled);
                gui_fps (0, 0, 0);
+               if (gui_data.md >= 0)
+                       gui_led (LED_MD, 0);
                for (i = 0; i < 4; i++) {
                        if (currprefs.floppyslots[i].dfxtype >= 0)
                                gui_led (LED_DF0 + i, 0);
index cc9199e974a4a6fd09b13d6e43e94b7393c9d058..23f9c67a8c7a9076e6b8fc298a6100d5fb48bf3c 100644 (file)
@@ -11573,7 +11573,7 @@ static void addfloppytype (HWND hDlg, int n)
        if (f_text >= 0)
                ew (hDlg, f_text, state);
        if (f_eject >= 0)
-               ew (hDlg, f_eject, workprefs.floppyslots[n].df[0] != 0);
+               ew (hDlg, f_eject, text[0] != 0);
        if (f_drive >= 0)
                ew (hDlg, f_drive, state);
        if (f_enable >= 0) {
@@ -11588,7 +11588,7 @@ static void addfloppytype (HWND hDlg, int n)
        if (f_wp >= 0)
                CheckDlgButton (hDlg, f_wp, chk);
        if (f_info >= 0)
-               ew (hDlg, f_info, workprefs.floppyslots[n].df[0] != 0);
+               ew (hDlg, f_info, text[0] != 0);
        chk = !showcd && state && DISK_validate_filename (&workprefs, text, 0, NULL, NULL, NULL) ? TRUE : FALSE;
        if (f_wp >= 0) {
                ew (hDlg, f_wp, chk && !workprefs.floppy_read_only);
@@ -17395,7 +17395,8 @@ void gui_flicker_led (int led, int unitnum, int status)
        if (led < 0) {
                gui_flicker_led2 (LED_HD, 0, 0);
                gui_flicker_led2 (LED_CD, 0, 0);
-               gui_flicker_led2 (LED_MD, 0, 0);
+               if (gui_data.md >= 0)
+                       gui_flicker_led2 (LED_MD, 0, 0);
        } else {
                gui_flicker_led2 (led, unitnum, status);
        }