fixed jaws version
authorH.G. Muller <h.g.muller@hccnet.nl>
Tue, 27 Oct 2009 19:22:36 +0000 (12:22 -0700)
committerArun Persaud <arun@nubati.net>
Tue, 27 Oct 2009 19:22:36 +0000 (12:22 -0700)
turns out the new mouse handler broke the JAWS patch, as I discarded
the function IsPromotion. I adapted it to call HasPromotionChoice instead.
Also fixed two arnings by removing a no-longer needed debug print.

winboard/jaws.c

index 8aad901..99f41b1 100644 (file)
@@ -229,7 +229,6 @@ AdaptMenu()
 \r
        helpMenuInfo.cbSize = sizeof(helpMenuInfo);\r
        menuMain = GetMenu(hwndMain);\r
-       if(appData.debugMode) fprintf(debugFP, "hwndMain: %8x %8x\n", hwndMain, menuMain);\r
        menuJAWS = CreatePopupMenu();\r
        \r
        for(i=0; menuItemJAWS[i].name; i++) {\r
@@ -1123,9 +1122,10 @@ KeyboardMove(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                                (BlackPawn <= pdown && pdown <= BlackKing &&\r
                                 BlackPawn <= pup && pup <= BlackKing))) {\r
                        /* EditPosition, empty square, or different color piece;\r
-                       click-click move is possible */\r
+                       click-click move is possible */         \r
+                       char promoChoice = NULLCHAR;\r
                \r
-                       if (IsPromotion(oldFromX, oldFromY, fromX, fromY)) {\r
+                       if (HasPromotionChoice(oldFromX, oldFromY, fromX, fromY, &promoChoice)) {\r
                                if (appData.alwaysPromoteToQueen) {\r
                                        UserMoveEvent(oldFromX, oldFromY, fromX, fromY, 'q');\r
                                }\r
@@ -1136,7 +1136,7 @@ KeyboardMove(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                                }       \r
                        }\r
                        else {\r
-                               UserMoveEvent(oldFromX, oldFromY, fromX, fromY, NULLCHAR);\r
+                               UserMoveEvent(oldFromX, oldFromY, fromX, fromY, promoChoice);\r
                        }\r
                oldFromX = oldFromY = -1;\r
                break;\r