projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SDL backend set the mouse button bitmask incorrectly
[dosdemo]
/
src
/
sdl
/
main.c
diff --git
a/src/sdl/main.c
b/src/sdl/main.c
index
6b65796
..
48852f5
100644
(file)
--- a/
src/sdl/main.c
+++ b/
src/sdl/main.c
@@
-129,10
+129,10
@@
static void handle_event(SDL_Event *ev)
break;
case SDL_MOUSEBUTTONDOWN:
break;
case SDL_MOUSEBUTTONDOWN:
- mouse_bmask |= 1 << ev->button.button;
+ mouse_bmask |= 1 << (ev->button.button - SDL_BUTTON_LEFT);
if(0) {
case SDL_MOUSEBUTTONUP:
if(0) {
case SDL_MOUSEBUTTONUP:
- mouse_bmask &= ~(1 << ev->button.button);
+ mouse_bmask &= ~(1 << (ev->button.button - SDL_BUTTON_LEFT));
}
mouse_x = ev->button.x / fbscale;
mouse_y = ev->button.y / fbscale;
}
mouse_x = ev->button.x / fbscale;
mouse_y = ev->button.y / fbscale;