From 784517dfb9650f284d5f7e283b47233c00183686 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 31 Dec 2014 14:56:42 +0500 Subject: Joystick: Suppress add/remove device events Previously they'll be printed to the console as a totally unknown events together claim this shouldn't have happened which is just misleading. --- source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/gameengine/GameLogic') diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp index 08f4d97ed1b..0033c137eb6 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp @@ -123,6 +123,12 @@ void SCA_Joystick::HandleEvents(void) case SDL_JOYBALLMOTION: SCA_Joystick::m_instance[sdl_event.jball.which]->OnBallMotion(&sdl_event); break; +#endif +#if SDL_VERSION_ATLEAST(2, 0, 0) + case SDL_JOYDEVICEADDED: + case SDL_JOYDEVICEREMOVED: + /* pass */ + break; #endif default: printf("SCA_Joystick::HandleEvents, Unknown SDL event (%d), this should not happen\n", sdl_event.type); -- cgit v1.2.3