From 11bbae40799a2c36513b52deca7261f02b54baab Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Mon, 17 Jan 2011 12:16:05 +0800 Subject: [PATCH] Still send idle events when receiving SDL joystick events, fixing possible joystick issues --- CHANGELOG.txt | 4 ++++ arch/sdl/event.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 532d256e1..845ebc6d2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/arch/sdl/event.c b/arch/sdl/event.c index 1bc7076b5..76f744e48 100644 --- a/arch/sdl/event.c +++ b/arch/sdl/event.c @@ -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; } }