[Bf-blender-cvs] [bf169d6] master: Fix T43066: Joystick broken in GE since 2.73rc

Campbell Barton noreply at git.blender.org
Fri Jan 2 07:15:05 CET 2015


Commit: bf169d6ca606bfb99ffa9cc831c73d2c4bdeda05
Author: Campbell Barton
Date:   Fri Jan 2 17:12:39 2015 +1100
Branches: master
https://developer.blender.org/rBbf169d6ca606bfb99ffa9cc831c73d2c4bdeda05

Fix T43066: Joystick broken in GE since 2.73rc

Caused by move to SDL2, fix thanks to jensverwiebe.

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

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

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

diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
index 765f056..e3bc409 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
@@ -111,7 +111,7 @@ SCA_Joystick *SCA_Joystick::GetInstance( short int joyindex )
 		char *videodriver = getenv("SDL_VIDEODRIVER");
 		BLI_setenv("SDL_VIDEODRIVER", "dummy");
 
-		int success = (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) != -1 );
+		int success = (SDL_InitSubSystem(SDL_INIT_JOYSTICK) != -1 );
 
 		BLI_setenv("SDL_VIDEODRIVER", videodriver);
 #  endif
@@ -156,11 +156,7 @@ void SCA_Joystick::ReleaseInstance()
 		/* The video subsystem is required for joystick input to work. However,
 		 * when GHOST is running under SDL, video is freed elsewhere.
 		 * Do this once only. */
-#  ifdef WITH_GHOST_SDL
 		SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
-#  else
-		SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO);
-#  endif
 #endif /* WITH_SDL */
 	}
 }




More information about the Bf-blender-cvs mailing list