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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-07-25 19:44:41 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-07-25 19:44:41 +0400
commit62415cab0520c70b4af874def93897c42d17e3d1 (patch)
tree9441391501b27d1146786db833f4a989b0d9089a
parentfee1594a650175babe009005c4d4f6ad5da20a03 (diff)
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.
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
index 0e08f157a6a..48ba09e67d2 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
@@ -89,7 +89,7 @@ SCA_Joystick *SCA_Joystick::GetInstance( short int joyindex )
{
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 @@ void SCA_Joystick::ReleaseInstance()
m_instance[i]= NULL;
}
- SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
+ SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO);
#endif
}
}