From 184f27e9fd01a5b639c38510767e5c22bcb6a9da Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 24 Jul 2015 23:48:58 +0200 Subject: [PATCH] Fix Shogi promotion popup With the new promotion defaults Shogi was using the Chess promotion popup rather than the Shogi (yes/no) one. --- dialogs.c | 2 +- winboard/winboard.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dialogs.c b/dialogs.c index 220f074..bdf775f 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1771,7 +1771,7 @@ PromotionPopUp (char choice) { // choice depends on variant: prepare dialog acordingly count = 8; SetPromo(_("Cancel"), --count, -1); // Beware: GenericPopUp cannot handle user buttons named "cancel" (lowe case)! - if(choice != '+') { + if(choice != '+' && !IS_SHOGI(gameInfo.variant)) { if (!appData.testLegality || gameInfo.variant == VariantSuicide || gameInfo.variant == VariantSpartan && !WhiteOnMove(currentMove) || gameInfo.variant == VariantGiveaway) { diff --git a/winboard/winboard.c b/winboard/winboard.c index c82ae8a..670e391 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -1283,6 +1283,7 @@ LFfromMFP(LOGFONT* lf, MyFontParams *mfp) lf->lfCharSet = mfp->charset; lf->lfOutPrecision = OUT_DEFAULT_PRECIS; + lf->lfClipPrecision = CLIP_DEFAULT_PRECIS; lf->lfQuality = DEFAULT_QUALITY; lf->lfPitchAndFamily = DEFAULT_PITCH|FF_DONTCARE; @@ -4611,7 +4612,7 @@ PromotionPopup(HWND hwnd) void PromotionPopUp(char choice) { - promoStyle = (choice == '+'); + promoStyle = (choice == '+' || IS_SHOGI(gameInfo.variant)); DrawPosition(TRUE, NULL); PromotionPopup(hwndMain); } @@ -5088,6 +5089,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case IDM_TwoMachines: TwoMachinesEvent(); /* + * refresh the tags dialog only if it's visible */ if (gameMode == TwoMachinesPlay && IsWindowVisible(editTagsDialog)) { -- 1.7.0.4