Browse Source

* Fixed OpenGL mouse handling

Sam      Le        Vieux      Porc 
            (\____/)
Le          / @__@ \            Le
           (  (oo)  )   
            `-.~~.-'         Vieux
Vieux        /    \             
           @/      \_          
          (/ /    \ \)        Porc
Porc       WW`----'WW        

Sam      Le        Vieux      Porc
tags/v0.99.beta14
Jean-Yves Lamoureux jylam 19 years ago
parent
commit
d5fcabb703
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      caca/driver_gl.c

+ 4
- 1
caca/driver_gl.c View File

@@ -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_state = state;
kk->drv.p->mouse_x = x / kk->drv.p->font_width; kk->drv.p->mouse_x = x / kk->drv.p->font_width;
kk->drv.p->mouse_y = y / kk->drv.p->font_height; 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; kk->drv.p->mouse_changed = 1;
} }


static void gl_handle_mouse_motion(int x, int y) static void gl_handle_mouse_motion(int x, int y)
{ {
caca_t *kk = gl_kk; caca_t *kk = gl_kk;

kk->drv.p->mouse_x = x / kk->drv.p->font_width; kk->drv.p->mouse_x = x / kk->drv.p->font_width;
kk->drv.p->mouse_y = y / kk->drv.p->font_height; 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; kk->drv.p->mouse_changed = 1;
} }




Loading…
Cancel
Save