2 * $Source: /cvs/cvsroot/d2x/arch/sdl/event.c,v $
5 * $Date: 2002-02-16 02:08:30 $
7 * SDL Event related stuff
9 * $Log: not supported by cvs2svn $
10 * Revision 1.4 2001/12/03 02:43:02 bradleyb
11 * lots of makefile fixes, and sdl joystick stuff
13 * Revision 1.3 2001/11/14 10:43:10 bradleyb
14 * remove cruft, fix formatting, begin joystick stuff
16 * Revision 1.2 2001/10/31 07:41:54 bradleyb
19 * Revision 1.1 2001/10/24 09:25:05 bradleyb
20 * Moved input stuff to arch subdirs, as in d1x.
22 * Revision 1.2 2001/01/29 14:03:57 bradleyb
23 * Fixed build, minor fixes
36 extern void key_handler(SDL_KeyboardEvent *event);
37 extern void mouse_button_handler(SDL_MouseButtonEvent *mbe);
38 extern void mouse_motion_handler(SDL_MouseMotionEvent *mme);
40 extern void joy_button_handler(SDL_JoyButtonEvent *jbe);
41 extern void joy_axis_handler(SDL_JoyAxisEvent *jae);
44 static int initialised=0;
50 while (SDL_PollEvent(&event)) {
54 key_handler((SDL_KeyboardEvent *)&event);
56 case SDL_MOUSEBUTTONDOWN:
57 case SDL_MOUSEBUTTONUP:
58 mouse_button_handler((SDL_MouseButtonEvent *)&event);
61 mouse_motion_handler((SDL_MouseMotionEvent *)&event);
64 case SDL_JOYBUTTONDOWN:
66 joy_button_handler((SDL_JoyButtonEvent *)&event);
68 case SDL_JOYAXISMOTION:
69 joy_axis_handler((SDL_JoyAxisEvent *)&event);
71 case SDL_JOYBALLMOTION:
72 case SDL_JOYHATMOTION:
85 // We should now be active and responding to events.