Still send idle events when receiving SDL joystick events, fixing possible joystick issues

This commit is contained in:
Chris Taylor 2011-01-17 12:16:05 +08:00
parent 76514d8ba1
commit 11bbae4079
2 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20110117
--------
arch/sdl/event.c: Still send idle events when receiving SDL joystick events, fixing possible joystick issues
20110116
--------
2d/bitblt.c, arch/ogl/gr.c, arch/ogl/ogl.c, include/ogl_init.h, main/menu.c: Added feature to enable Anisotropic filtering is supported by hardware or driver; Reworked way of handling texture filtering information so ingame switching is possible again; Little fix for ogl_get_verinfo which was taken out for ordinary OGL code but should for OGLES

View file

@ -38,7 +38,6 @@ void event_poll()
// like pressing 'Return' really fast at 'Difficulty Level' causing multiple games to be started
while ((wind == window_get_front()) && SDL_PollEvent(&event))
{
idle = 0;
switch(event.type) {
case SDL_KEYDOWN:
case SDL_KEYUP:
@ -46,13 +45,16 @@ void event_poll()
memset(unicode_frame_buffer,'\0',sizeof(unsigned char)*KEY_BUFFER_SIZE);
clean_uniframe=0;
key_handler((SDL_KeyboardEvent *)&event);
idle = 0;
break;
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
mouse_button_handler((SDL_MouseButtonEvent *)&event);
idle = 0;
break;
case SDL_MOUSEMOTION:
mouse_motion_handler((SDL_MouseMotionEvent *)&event);
idle = 0;
break;
case SDL_JOYBUTTONDOWN:
case SDL_JOYBUTTONUP:
@ -69,6 +71,7 @@ void event_poll()
case SDL_QUIT: {
d_event event = { EVENT_QUIT };
call_default_handler(&event);
idle = 0;
} break;
}
}