[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38697] trunk/blender/source/gameengine/ GameLogic/Joystick/SCA_Joystick.cpp: Fix #28014: joystick sensor not working.
Brecht Van Lommel
brechtvanlommel at pandora.be
Mon Jul 25 17:44:41 CEST 2011
Revision: 38697
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38697
Author: blendix
Date: 2011-07-25 15:44:41 +0000 (Mon, 25 Jul 2011)
Log Message:
-----------
Fix #28014: joystick sensor not working. Broke this with an earlier commit
trying to fix blenderplayer startup warnings. It seems we do need to init
the SDL video subsystem even if we only want events, thanks Juha Maki-Kanto
for pointing this out.
Modified Paths:
--------------
trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
Modified: trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp 2011-07-25 15:37:55 UTC (rev 38696)
+++ trunk/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp 2011-07-25 15:44:41 UTC (rev 38697)
@@ -89,7 +89,7 @@
{
int i;
// do this once only
- if(SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1 ){
+ if(SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) == -1 ){
echo("Error-Initializing-SDL: " << SDL_GetError());
return NULL;
}
@@ -124,7 +124,7 @@
m_instance[i]= NULL;
}
- SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
+ SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO);
#endif
}
}
More information about the Bf-blender-cvs
mailing list