[Solved] PyOgre and PyGame: joystick problem

RedSkull

16-02-2006 18:46:55

Hi all! I'm making a demo using PyOgre and one of demo's requisite is that it's support joystick. I use the joystick module from PyGame inside my PyOgre demo and all seems work fine but...

when I quit the demo always occurs a Python error: "python.exe has detected a problem and it has to be closed..."

I debugged the demo and the problem comes with the initialization sentence "pygame.init()". Only with that sentence the error occurs.

Then I've tried initialize only joystick module from pygame but I encounter another error (before ogre can run) about video system:



Summarizing, if I initialize the video system with pygame (pygame.display.init()) the crash when exit but if I don't initialize it works worse.

It is incompatible PyGame with PyOgre? or, I am ignoring something?

Thanks.

--- SOLUTION ---

Don't forget to write the sentence "pygame.quit()" before leaving the program. :oops: