*in progress*
authorEleni Maria Stea <elene.mst@gmail.com>
Sat, 23 Feb 2013 19:52:14 +0000 (21:52 +0200)
committerEleni Maria Stea <elene.mst@gmail.com>
Sat, 23 Feb 2013 19:52:14 +0000 (21:52 +0200)
changed fb button too
TODO:
1 in fill_rect check boundaries !!
2 vsync
3 the abs pos bug

Makefile
src/fbdev/mouse.cc

index a894e52..ad3fd6c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ dbg = -g
 opt = -O0
 inc = -Isrc
 
-backend = SDL
+#backend = SDL
 
 ifeq ($(backend), SDL)
        def = -DWINNIE_SDL
index 5fd080b..62271ab 100644 (file)
@@ -101,7 +101,8 @@ void process_mouse_event()
                        int s = (bnstate >> i) & 1;
                        int prev_s = (prev_state >> i) & 1;
                        if(s != prev_s) {
-                               button_callback(top, i, s);
+                               Rect rect = top->get_absolute_rect();
+                               button_callback(top, i, s, pointer_x - rect.x, pointer_y - rect.y);
                        }
                }
        }