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:
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 6b3f745b899..a54d4909db9 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -1428,15 +1428,15 @@ PyObject *initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack
PyDict_SetItemString(d, "mouse", gp_PythonMouse->NewProxy(true));
PyObject* joylist = PyList_New(JOYINDEX_MAX);
- SCA_JoystickManager* joyevent = (SCA_JoystickManager*)gp_KetsjiScene->GetLogicManager()->FindEventManager(SCA_EventManager::JOY_EVENTMGR);
for (int i=0; i<JOYINDEX_MAX; ++i) {
- SCA_Joystick* joy = joyevent->GetJoystickDevice(i);
+ SCA_Joystick* joy = SCA_Joystick::GetInstance(i);
if (joy && joy->Connected()) {
gp_PythonJoysticks[i] = new SCA_PythonJoystick(joy);
PyObject* tmp = gp_PythonJoysticks[i]->NewProxy(true);
Py_INCREF(tmp);
PyList_SET_ITEM(joylist, i, tmp);
} else {
+ joy->ReleaseInstance();
Py_INCREF(Py_None);
PyList_SET_ITEM(joylist, i, Py_None);
}