From: Daniel Mehrmann Date: Tue, 10 Feb 2004 23:37:25 +0000 (+0000) Subject: Cleanup mouse wheel: Only call it if we have moves X-Git-Tag: v4.2.8~54 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=489d11dd27f897a1e563713724358901822b1e26;p=xboard.git Cleanup mouse wheel: Only call it if we have moves --- diff --git a/winboard/winboard.c b/winboard/winboard.c index 69146fc..c000f95 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -3112,11 +3112,14 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Mouse Wheel is being rolled forward * Play moves forward */ - if((short)HIWORD(wParam) > 0 ) ForwardEvent(); - /* Mouse Wheel is being rolled backward - * Play moves backward - */ - if((short)HIWORD(wParam) < 0 ) BackwardEvent(); + if ((short)HIWORD(wParam) > 0) + if (forwardMostMove > 0 && currentMove != forwardMostMove) + ForwardEvent(); + /* Mouse Wheel is being rolled backward + * Play moves backward + */ + if ((short)HIWORD(wParam) < 0) + if (currentMove > 0) BackwardEvent(); break; case WM_MBUTTONDOWN: case WM_RBUTTONDOWN: