]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix statusbar button mouse click offset
authorToni Wilen <twilen@winuae.net>
Sun, 17 Aug 2025 16:21:21 +0000 (19:21 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 17 Aug 2025 16:21:21 +0000 (19:21 +0300)
od-win32/win32.cpp

index 724dc77df046ea73f4ddbcd359a7c4b16b494161..56c2b1dd1c6a97f3649433f392781ece73b6a594 100644 (file)
@@ -2789,7 +2789,7 @@ static LRESULT CALLBACK AmigaWindowProc(HWND hWnd, UINT message, WPARAM wParam,
                        {
                                LPNMMOUSE lpnm = (LPNMMOUSE)lParam;
                                int num = (int)lpnm->dwItemSpec;
-                               int df0 = 9;
+                               int df0 = 11;
                                if (num >= df0 && num <= df0 + 3) { // DF0-DF3
                                        num -= df0;
                                        if (nm->code == NM_RCLICK) {
@@ -2798,12 +2798,13 @@ static LRESULT CALLBACK AmigaWindowProc(HWND hWnd, UINT message, WPARAM wParam,
                                                DiskSelection(hWnd, IDC_DF0 + num, 0, &changed_prefs, NULL, NULL);
                                                disk_insert(num, changed_prefs.floppyslots[num].df);
                                        }
-                               } else if (num == 5) {
-                                       if (nm->code == NM_CLICK) // POWER
+                               } else if (num == 6) { // POWER
+                                       if (nm->code == NM_CLICK) {
                                                inputdevice_add_inputcode(AKS_ENTERGUI, 1, NULL);
-                                       else
+                                       } else {
                                                uae_reset(0, 1);
-                               } else if (num == 4) {
+                                       }
+                               } else if (num == 4) { // FPS
                                        if (pause_emulation) {
                                                resumepaused(9);
                                                setmouseactive(mon->monitor_id, 1);