[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] PyGame Joysticks and PyGTK



>     pygame.joystick.init()
>     pygame.display.init()
> 
> Then I have a Joystick Event Handler than takes care of everything
> else.
> 
> Am I safe to run these commands inside a separate thread or something?
> So I can still have the GTK Main Loop running, as well as handle the
> Pygame Event inputs from the Joystick?
> 

Hi,

I am not quite sure but I think you can run these commands anywhere at
your app's startup (at importation or in a __init__ method).

According to the documentation, joystick.init() and display.init() don't
start a loop but rather initialize some variables and look for devices.

Display's and joystick's loops are managed by yourself (with update,
flip, and events' module methods), so your gtk loop is the main loop of
your app and you put these commands into this loop.

Dis you try this ? and did it work ?

Cheers,
Nicolas