Am 05.02.2012 um 23:16 schrieb Arnaud Nicolet:

> Greetings!
> 
> I want to access an USB device in my application (a pad with 8 buttons). My 
> app also uses a kind of SpriteSurface so it uses a lot of CPU. Alone, the USB 
> device works well in my app, using the MacHIDMBS class, but when used with 
> the SpriteSurface (threaded, else it would fail completely), the USB events 
> are received way too late (I continue to receive <empty state>, even when I 
> press a button, and perhaps 7 seconds later I get the value). It appears the 
> ReceivedData, which runs continuously as you know, is slowed down because of 
> the rest of my app.

The event is called from a carbon event, because we receive the data on a 
worker thread and this is an easy way to send data to main thread.
But for this to work, your main thread must have free CPU time for event 
dispatching.

Not sure how this Sprite surface works, but it should somewhere give CPU time 
to other parts of app.
e.g. call DoEvents or WaitNextEvent.

Greetings
Christian

-- 
See you in Orlando, Florida for Real World 2012

More details and registration here:
http://www.realsoftware.com/community/realworld.php



_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to