Seth Willits schrieb dereinst (am 13.05.2006 0:10 Uhr) via [EMAIL PROTECTED]:

> IOKit / HIDManager etc. It's standard stuff, nothing special.

With HID.Bundle in place, the GameInputManager class shows device "Apple IR"
with several elements:
Consumer Usage 0xffffffff
Consumer Usage 0xb4
Consumer Usage 0xb3
Consumer Usage 0x40
Vendor Defined Usage 0xffffffff
Vendor Defined Usage 0x20
Vendor Defined Usage 0x21
Vendor Defined Usage 0x22
Vendor Defined Usage 0x23
Page: 0x6, Usage 0x22

However, using GameInputManager.WaitForElement(10 or whatever) does not
work. Apparently there *is* a special flag when opening a device (please see
below) that is not accessible from Rb/GameInputManager.

E. Tejkowski schrieb dereinst (am 13.05.2006 0:37 Uhr) via
[EMAIL PROTECTED]:

> Sounds possible. Check out the discussions on this list.
> 
> http://www.cocoadev.com/index.pl?UsingTheAppleRemoteControl

Ah, thanks. This snippet from your link explains a lot:
--------------------------------------------------------------------
...what happens when two apps try to ask for exclusive access to the remote.
Well, it turns out that the first app will return success from the open
call, while the second app will get an error response saying that the device
was already opened for exclusive access--but it can still create the queue
and receive receive events.

So, I've got code now that looks something like this (now using a constant
from <hid/IOHIDKeys?.h> for the open flag):

ioReturnValue = (*hidDeviceInterface)->open(hidDeviceInterface,
kIOHIDOptionsTypeSeizeDevice);
if (ioReturnValue == kIOReturnExclusiveAccess) {
    printf("Another app has already got exclusive access, but we can still
listen for events.");
}
--------------------------------------------------------------------
I understand that Front Row claims exclusive access and Rb does not, hence
cannot even listen non-exclusively.

Any workaround? Feature request?

Cheers,

Knut




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to