Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-12-31 12:56:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-31 12:56:42 +0300
commit784517dfb9650f284d5f7e283b47233c00183686 (patch)
tree312066c31bc790a78ce35df4e0b9c205517cfbea /source/gameengine/GameLogic
parentf3e7369d486670418db49241c0872d3d798c8fed (diff)
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.
Diffstat (limited to 'source/gameengine/GameLogic')
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp6
1 files changed, 6 insertions, 0 deletions
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
@@ -124,6 +124,12 @@ void SCA_Joystick::HandleEvents(void)
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);
break;