Commit ea225564 authored by Sam Lantinga's avatar Sam Lantinga

Mouse wheel fix patch.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40333
parent 0db42ad8
...@@ -370,6 +370,8 @@ LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) ...@@ -370,6 +370,8 @@ LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
button = 5; button = 5;
posted = SDL_PrivateMouseButton( posted = SDL_PrivateMouseButton(
SDL_PRESSED, button, 0, 0); SDL_PRESSED, button, 0, 0);
posted |= SDL_PrivateMouseButton(
SDL_RELEASED, button, 0, 0);
} }
} }
return(0); return(0);
......
...@@ -392,11 +392,13 @@ static void handle_mouse(const int numevents, DIDEVICEOBJECTDATA *ptrbuf) ...@@ -392,11 +392,13 @@ static void handle_mouse(const int numevents, DIDEVICEOBJECTDATA *ptrbuf)
yrel = 0; yrel = 0;
} }
if((int)ptrbuf[i].dwData > 0) if((int)ptrbuf[i].dwData > 0)
button = 4;
else
button = 5;
posted = SDL_PrivateMouseButton( posted = SDL_PrivateMouseButton(
SDL_PRESSED, 4, 0, 0); SDL_PRESSED, button, 0, 0);
else if((int)ptrbuf[i].dwData < 0) posted |= SDL_PrivateMouseButton(
posted = SDL_PrivateMouseButton( SDL_RELEASED, button, 0, 0);
SDL_PRESSED, 5, 0, 0);
break; break;
case DIMOFS_BUTTON0: case DIMOFS_BUTTON0:
case DIMOFS_BUTTON1: case DIMOFS_BUTTON1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment