From: Daniel Mehrmann Date: Mon, 9 Feb 2004 18:49:19 +0000 (+0000) Subject: Add Mousewheel support for winboard. Play the moves foward and backward with X-Git-Tag: v4.2.8~56 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=9d33882a8307d8e00849941e30032d99fc75de43;p=xboard.git Add Mousewheel support for winboard. Play the moves foward and backward with the Mousewheel. --- diff --git a/winboard/winboard.c b/winboard/winboard.c index 32addcc..69146fc 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -3108,7 +3108,16 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) dragInfo.lastpos = dragInfo.pos; } break; - + case WM_MOUSEWHEEL: + /* 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(); + break; case WM_MBUTTONDOWN: case WM_RBUTTONDOWN: ErrorPopDown(); @@ -3415,6 +3424,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MBUTTONUP: case WM_RBUTTONUP: case WM_MOUSEMOVE: + case WM_MOUSEWHEEL: MouseEvent(hwnd, message, wParam, lParam); break;