projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added fields to graphics info structure to store current mouse position
[rocksndiamonds.git]
/
src
/
events.c
diff --git
a/src/events.c
b/src/events.c
index b94e57c5cbfbce47c600abc665a2ac96c09f3439..52595e2512fd177b4127a1bd4af4b3cf13579275 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-74,6
+74,9
@@
static int FilterEvents(const Event *event)
{
((MotionEvent *)event)->x -= video.screen_xoffset;
((MotionEvent *)event)->y -= video.screen_yoffset;
{
((MotionEvent *)event)->x -= video.screen_xoffset;
((MotionEvent *)event)->y -= video.screen_yoffset;
+
+ gfx.mouse_x = ((MotionEvent *)event)->x;
+ gfx.mouse_y = ((MotionEvent *)event)->y;
}
// non-motion events are directly passed to event handler functions
}
// non-motion events are directly passed to event handler functions