From 7e57e463246f702af0f6423eecda619a1ae28df0 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 30 Aug 2011 18:27:58 +0200 Subject: [PATCH] Slightly decrease sensitivity of sweep actions The sweep-selection of promotion and drop pieces, or step through the PV was so sensitive that it was difficult to reliably make the intended choice. It has now been reduced by a factor 1.5-2, and the sweep selection and PV walk now also use a different value. --- backend.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend.c b/backend.c index 9a06885..ae1eba1 100644 --- a/backend.c +++ b/backend.c @@ -5140,7 +5140,7 @@ int PromoScroll(int x, int y) int step = 0; if(promoSweep == EmptySquare || !appData.sweepSelect) return FALSE; - if(abs(x - lastX) < 15 && abs(y - lastY) < 15) return FALSE; + if(abs(x - lastX) < 25 && abs(y - lastY) < 25) return FALSE; if( y > lastY + 2 ) step = -1; else if(y < lastY - 2) step = 1; if(!step) return FALSE; lastX = x; lastY = y; @@ -5468,11 +5468,11 @@ UnLoadPV() void MovePV(int x, int y, int h) { // step through PV based on mouse coordinates (called on mouse move) - int margin = h>>3, step = 0; + int margin = h>>3, step = 0, threshold = (pieceSweep == EmptySquare ? 10 : 15); // we must somehow check if right button is still down (might be released off board!) if(endPV < 0 && pieceSweep == EmptySquare) return; // needed in XBoard because lastX/Y is shared :-( - if(abs(x - lastX) < 7 && abs(y - lastY) < 7) return; + if(abs(x - lastX) < threshold && abs(y - lastY) < threshold) return; if( y > lastY + 2 ) step = -1; else if(y < lastY - 2) step = 1; if(!step) return; lastX = x; lastY = y; -- 1.7.0.4