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

Re: [pygame] Wii Remote support -- first patch



René Dudfield <renesd@xxxxxxxxx> suggested:

> For pygame integration posting events into the event queue would be a
> good idea ( pygame.event.post ).  Maybe run in another thread, or
> polled at the required frequency with pygame.time.set_timer ?

I'd suggest not creating another thread if we don't absolutely need to.

Would it be possible to query the result of the overlapped IO as part of
the pygame.event.pump / pygame.event.get calls? The game is going to be
calling those already.

Some reasons why that might not work:

- I recall reading in the code that some of the accelerometer calculations
work best if the device is polled with inconsistent frequency. I don't
know how big a problem that is in practice.

- The bluetooth library code might want to be called more frequently than
once per (graphics) frame.


I haven't dug around very much inside the code, so I don't know how it
looks in there, but it seems like the pygame.event.pump code is already
doing periodic input work, just like what we would need for the Wii
controllers.

-Dave LeCompte