Mouse wheel fix patch.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40333
This commit is contained in:
parent
0db42ad87a
commit
ea22556441
2 changed files with 8 additions and 4 deletions
|
@ -370,6 +370,8 @@ LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
button = 5;
|
||||
posted = SDL_PrivateMouseButton(
|
||||
SDL_PRESSED, button, 0, 0);
|
||||
posted |= SDL_PrivateMouseButton(
|
||||
SDL_RELEASED, button, 0, 0);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
|
|
|
@ -392,11 +392,13 @@ static void handle_mouse(const int numevents, DIDEVICEOBJECTDATA *ptrbuf)
|
|||
yrel = 0;
|
||||
}
|
||||
if((int)ptrbuf[i].dwData > 0)
|
||||
button = 4;
|
||||
else
|
||||
button = 5;
|
||||
posted = SDL_PrivateMouseButton(
|
||||
SDL_PRESSED, 4, 0, 0);
|
||||
else if((int)ptrbuf[i].dwData < 0)
|
||||
posted = SDL_PrivateMouseButton(
|
||||
SDL_PRESSED, 5, 0, 0);
|
||||
SDL_PRESSED, button, 0, 0);
|
||||
posted |= SDL_PrivateMouseButton(
|
||||
SDL_RELEASED, button, 0, 0);
|
||||
break;
|
||||
case DIMOFS_BUTTON0:
|
||||
case DIMOFS_BUTTON1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue