Skip to content

Commit

Permalink
Mouse wheel fix patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Apr 8, 2002
1 parent 92ba4d5 commit 02a30bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/video/wincommon/SDL_sysevents.c
Expand Up @@ -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);
Expand Down
10 changes: 6 additions & 4 deletions src/video/windx5/SDL_dx5events.c
Expand Up @@ -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:
Expand Down

0 comments on commit 02a30bb

Please sign in to comment.