Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Fix mouse, keyboard and joystick python proxy.
Previously all the python proxies for mouse, keyboard and joystick was python owned and made that when the bge.logic module was freed the proxies was freed too. This case not appear as the bge.logic module is not freed following the python behaviour, and that we manually delete the mouse, keyboard and joystick at the end of the game without noticed issues. But with the refactor on joystick and the add remove feature, the joystick python proxy was deleted twice, once from python when replacing a joystick python proxy and a second time manually from the game end. To fix this issue the proxy creation which was using NewProxy(true) is now replaced by GetProxy. In the same time the items in the joystick list are done with PyList_SetItem instead of PyList_SET_ITEM, which is more reference safer.
- Loading branch information