From 489d11dd27f897a1e563713724358901822b1e26 Mon Sep 17 00:00:00 2001 From: Daniel Mehrmann Date: Tue, 10 Feb 2004 23:37:25 +0000 Subject: [PATCH] Cleanup mouse wheel: Only call it if we have moves --- winboard/winboard.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) 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: -- 1.7.0.4