Commit: 6fab0a46437249e384ba1ba8183c21b746fd5e4d
Author: Sergey Sharybin
Date:   Wed Dec 31 14:56:42 2014 +0500
Branches: blender-v2.73-release
https://developer.blender.org/rB6fab0a46437249e384ba1ba8183c21b746fd5e4d

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.

===================================================================

M       source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp

===================================================================

diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp 
b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
index 08f4d97..0033c13 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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to