projects
/
winnie
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added struct subsys so that we know each
[winnie]
/
src
/
sdl
/
mouse.cc
diff --git
a/src/sdl/mouse.cc
b/src/sdl/mouse.cc
index
db39d4a
..
3ba98a0
100644
(file)
--- a/
src/sdl/mouse.cc
+++ b/
src/sdl/mouse.cc
@@
-24,8
+24,9
@@
Author: Eleni Maria Stea <elene.mst@gmail.com>
#include "mouse.h"
#include "shalloc.h"
#include "mouse.h"
#include "shalloc.h"
-#include "window.h"
#include "wm.h"
#include "wm.h"
+#include "window.h"
+#include "winnie.h"
extern SDL_Event sdl_event;
extern SDL_Event sdl_event;
@@
-42,6
+43,8
@@
bool init_mouse()
if(!(mouse = (Mouse*)sh_malloc(sizeof *mouse))) {
return false;
}
if(!(mouse = (Mouse*)sh_malloc(sizeof *mouse))) {
return false;
}
+ get_subsys()->mouse_offset = (int)((char*)mouse - (char*)get_pool());
+
memset(mouse, 0, sizeof *mouse);
return true;
}
memset(mouse, 0, sizeof *mouse);
return true;
}