From ebcbd4b12741dd5598bee06d531fa3d75e4bba93 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 27 Oct 2009 12:22:36 -0700 Subject: [PATCH] fixed jaws version 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 | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/winboard/jaws.c b/winboard/jaws.c index 8aad901..99f41b1 100644 --- a/winboard/jaws.c +++ b/winboard/jaws.c @@ -229,7 +229,6 @@ AdaptMenu() helpMenuInfo.cbSize = sizeof(helpMenuInfo); menuMain = GetMenu(hwndMain); - if(appData.debugMode) fprintf(debugFP, "hwndMain: %8x %8x\n", hwndMain, menuMain); menuJAWS = CreatePopupMenu(); for(i=0; menuItemJAWS[i].name; i++) { @@ -1123,9 +1122,10 @@ KeyboardMove(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) (BlackPawn <= pdown && pdown <= BlackKing && BlackPawn <= pup && pup <= BlackKing))) { /* EditPosition, empty square, or different color piece; - click-click move is possible */ + click-click move is possible */ + char promoChoice = NULLCHAR; - if (IsPromotion(oldFromX, oldFromY, fromX, fromY)) { + if (HasPromotionChoice(oldFromX, oldFromY, fromX, fromY, &promoChoice)) { if (appData.alwaysPromoteToQueen) { UserMoveEvent(oldFromX, oldFromY, fromX, fromY, 'q'); } @@ -1136,7 +1136,7 @@ KeyboardMove(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } } else { - UserMoveEvent(oldFromX, oldFromY, fromX, fromY, NULLCHAR); + UserMoveEvent(oldFromX, oldFromY, fromX, fromY, promoChoice); } oldFromX = oldFromY = -1; break; -- 1.7.0.4