3 * SDL Event related stuff
17 extern void key_handler(SDL_KeyboardEvent *event);
18 extern void mouse_button_handler(SDL_MouseButtonEvent *mbe);
19 extern void mouse_motion_handler(SDL_MouseMotionEvent *mme);
20 #ifndef USE_LINUX_JOY // stpohle - so we can choose at compile time..
21 extern void joy_button_handler(SDL_JoyButtonEvent *jbe);
22 extern void joy_hat_handler(SDL_JoyHatEvent *jhe);
23 extern void joy_axis_handler(SDL_JoyAxisEvent *jae);
26 static int initialised=0;
32 while (SDL_PollEvent(&event)) {
36 key_handler((SDL_KeyboardEvent *)&event);
38 case SDL_MOUSEBUTTONDOWN:
39 case SDL_MOUSEBUTTONUP:
40 mouse_button_handler((SDL_MouseButtonEvent *)&event);
43 mouse_motion_handler((SDL_MouseMotionEvent *)&event);
45 #ifndef USE_LINUX_JOY // stpohle - so we can choose at compile time..
46 case SDL_JOYBUTTONDOWN:
48 joy_button_handler((SDL_JoyButtonEvent *)&event);
50 case SDL_JOYAXISMOTION:
51 joy_axis_handler((SDL_JoyAxisEvent *)&event);
53 case SDL_JOYHATMOTION:
54 joy_hat_handler((SDL_JoyHatEvent *)&event);
56 case SDL_JOYBALLMOTION:
60 void quit_request(void);
69 // We should now be active and responding to events.