Re: [AD] Ouya controller support

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


2013/7/15 Beoran <beoran@xxxxxxxxxx>
Op 15-07-13 01:29, Jonathan Lilliemarck schreef:
> javap only decompiles to bytecode. But I found this:
> http://java.decompiler.free.fr/. I could just drag and drop the
> class file there and get the code. The controller does some kind of
> query to a ContentResolver to map the the device id to a player
> number. I know to little about Android to understand what is
> happening here.
>

Well, I'm stating the obvious here, but ContentResolver is the next
class to decompile then. You may need to decompress all jar files in
the ODK to find it.
Knowing Java, I reckon you'll have to chase through and decompile
quite a few classes before you get to the bottom of this.

Just to repeat I am looking for how to map a controller to a player number. The OuyaController does this with the device id that is retrieved with KeyEvent.getDeviceId() but I can't find any connection between this device id and the /dev/input/event device. Each time the controller connects, the KeyEvent device id changes. Since we don't use KeyEvent I am unsure if we can use the OuyaController class. The ContentResolver is an Android class and I think it can be understood from the documentation alone.

I have been investigating the /dev/input/event device too hoping that the ABS_MISC value would contain bits for the LEDs or something but ABS_MISC is just 0 most of the time. The device also reports four weird buttons but they don't seem to have anything to do with the player number either.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/