projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- fixed retarded mouse
[laserbrain_demo]
/
src
/
main.cc
diff --git
a/src/main.cc
b/src/main.cc
index
e2e969a
..
eff77a5
100644
(file)
--- a/
src/main.cc
+++ b/
src/main.cc
@@
-184,8
+184,7
@@
static void process_event(SDL_Event *ev)
case SDL_MOUSEMOTION:
if(mouse_grabbed) {
case SDL_MOUSEMOTION:
if(mouse_grabbed) {
- // XXX xrel/yrel seems faster by default
- app_mouse_delta(ev->motion.xrel * 0.75, ev->motion.yrel * 0.75);
+ app_mouse_delta(ev->motion.xrel, ev->motion.yrel);
} else {
app_mouse_motion(ev->motion.x * scale_factor, ev->motion.y * scale_factor);
}
} else {
app_mouse_motion(ev->motion.x * scale_factor, ev->motion.y * scale_factor);
}
@@
-203,6
+202,11
@@
static void process_event(SDL_Event *ev)
case SDL_CONTROLLERAXISMOTION:
app_gamepad_axis(ev->caxis.axis, ev->caxis.value / 32768.0f);
break;
case SDL_CONTROLLERAXISMOTION:
app_gamepad_axis(ev->caxis.axis, ev->caxis.value / 32768.0f);
break;
+
+ case SDL_CONTROLLERBUTTONDOWN:
+ case SDL_CONTROLLERBUTTONUP:
+ app_gamepad_button(ev->cbutton.button, ev->type == SDL_CONTROLLERBUTTONDOWN);
+ break;
}
}
}
}