From d5fcabb703654783c385666a249d1f149ba06242 Mon Sep 17 00:00:00 2001 From: Jean-Yves Lamoureux Date: Mon, 27 Mar 2006 18:17:09 +0000 Subject: [PATCH] * Fixed OpenGL mouse handling Sam Le Vieux Porc (\____/) Le / @__@ \ Le ( (oo) ) `-.~~.-' Vieux Vieux / \ @/ \_ (/ / \ \) Porc Porc WW`----'WW Sam Le Vieux Porc --- caca/driver_gl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/caca/driver_gl.c b/caca/driver_gl.c index 6e0575e..db0c1d8 100644 --- a/caca/driver_gl.c +++ b/caca/driver_gl.c @@ -461,15 +461,18 @@ static void gl_handle_mouse(int button, int state, int x, int y) kk->drv.p->mouse_state = state; kk->drv.p->mouse_x = x / kk->drv.p->font_width; kk->drv.p->mouse_y = y / kk->drv.p->font_height; + kk->mouse.x = kk->drv.p->mouse_x; + kk->mouse.y = kk->drv.p->mouse_y; kk->drv.p->mouse_changed = 1; } static void gl_handle_mouse_motion(int x, int y) { caca_t *kk = gl_kk; - kk->drv.p->mouse_x = x / kk->drv.p->font_width; kk->drv.p->mouse_y = y / kk->drv.p->font_height; + kk->mouse.x = kk->drv.p->mouse_x; + kk->mouse.y = kk->drv.p->mouse_y; kk->drv.p->mouse_changed = 1; }