Ignore:
Timestamp:
Jun 25, 2005, 1:27:31 PM (17 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • OpenGL driver mouse support
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/event.c

    r487 r493  
    6565extern int gl_new_width;
    6666extern int gl_new_height;
    67 
     67extern unsigned char gl_mouse_changed, gl_mouse_clicked;
     68extern unsigned int gl_mouse_x, gl_mouse_y;
     69extern unsigned int gl_mouse_button, gl_mouse_state;
    6870#endif
    6971#include "caca.h"
     
    747749              if(!_caca_resize)
    748750                {
    749 
    750 
    751751                  _caca_resize = 1;
    752752                  gl_resized=0;
     
    754754                }
    755755            }
    756 
     756          if(gl_mouse_changed)
     757            {
     758              if(gl_mouse_clicked)
     759                {
     760                  event|= CACA_EVENT_MOUSE_PRESS | gl_mouse_button;
     761                  gl_mouse_clicked=0;
     762                }
     763              mouse_x = gl_mouse_x;
     764              mouse_y = gl_mouse_y;
     765              event |= CACA_EVENT_MOUSE_MOTION | (mouse_x << 12) | mouse_y;
     766              gl_mouse_changed = 0;
     767            }
    757768          if(gl_key!=0)
    758769            {
Note: See TracChangeset for help on using the changeset viewer.