Still send idle events when receiving SDL joystick events, fixing possible joystick issues
This commit is contained in:
parent
acb1494124
commit
b64794e1b4
|
@ -1,5 +1,9 @@
|
||||||
D2X-Rebirth Changelog
|
D2X-Rebirth Changelog
|
||||||
|
|
||||||
|
20110117
|
||||||
|
--------
|
||||||
|
arch/sdl/event.c: Still send idle events when receiving SDL joystick events, fixing possible joystick issues
|
||||||
|
|
||||||
20110116
|
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
|
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
|
||||||
|
|
|
@ -38,7 +38,6 @@ void event_poll()
|
||||||
// like pressing 'Return' really fast at 'Difficulty Level' causing multiple games to be started
|
// like pressing 'Return' really fast at 'Difficulty Level' causing multiple games to be started
|
||||||
while ((wind == window_get_front()) && SDL_PollEvent(&event))
|
while ((wind == window_get_front()) && SDL_PollEvent(&event))
|
||||||
{
|
{
|
||||||
idle = 0;
|
|
||||||
switch(event.type) {
|
switch(event.type) {
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
case SDL_KEYUP:
|
case SDL_KEYUP:
|
||||||
|
@ -46,13 +45,16 @@ void event_poll()
|
||||||
memset(unicode_frame_buffer,'\0',sizeof(unsigned char)*KEY_BUFFER_SIZE);
|
memset(unicode_frame_buffer,'\0',sizeof(unsigned char)*KEY_BUFFER_SIZE);
|
||||||
clean_uniframe=0;
|
clean_uniframe=0;
|
||||||
key_handler((SDL_KeyboardEvent *)&event);
|
key_handler((SDL_KeyboardEvent *)&event);
|
||||||
|
idle = 0;
|
||||||
break;
|
break;
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
mouse_button_handler((SDL_MouseButtonEvent *)&event);
|
mouse_button_handler((SDL_MouseButtonEvent *)&event);
|
||||||
|
idle = 0;
|
||||||
break;
|
break;
|
||||||
case SDL_MOUSEMOTION:
|
case SDL_MOUSEMOTION:
|
||||||
mouse_motion_handler((SDL_MouseMotionEvent *)&event);
|
mouse_motion_handler((SDL_MouseMotionEvent *)&event);
|
||||||
|
idle = 0;
|
||||||
break;
|
break;
|
||||||
case SDL_JOYBUTTONDOWN:
|
case SDL_JOYBUTTONDOWN:
|
||||||
case SDL_JOYBUTTONUP:
|
case SDL_JOYBUTTONUP:
|
||||||
|
@ -69,6 +71,7 @@ void event_poll()
|
||||||
case SDL_QUIT: {
|
case SDL_QUIT: {
|
||||||
d_event event = { EVENT_QUIT };
|
d_event event = { EVENT_QUIT };
|
||||||
call_default_handler(&event);
|
call_default_handler(&event);
|
||||||
|
idle = 0;
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue