Greetings,
Sorry for being too dunce to understand this without asking, but what keeps retroplayer from existing on android?
Not asking it to be done, available today, etc. I'm just curious about the availability of test builds in win/mac/nix/rpi yet never android. Just wondering if there are specific things missing in Android
Thanks for any insight
joystick support is missing on android. The build system for the emulators needs to be modified to build for android. Those two things are all that's left
I'm working on android joystick support. This will be included when I merge my input work in 17 alpha 1 (january timeframe). Another team member was asking about android support, so if he takes care of the build system stuff we can get some android builds out after the input stuff is merged.
I'll be happy to look at the build system once joystick stuff at least builds.
Looking forward to this a lot, actually - just might push me into getting one of those Android Shield units. You have to think it should be able to handle whatever's thrown at it from an emulating standpoint. I wonder if, given that the shield comes with its own controller, the API would/could be streamlined for it...
the PR for the first half of retroplayer is up (
PR 8807), and look at what the only remaining blocking TODO is
I've updated my android buildsystem today and am ready to look into getting the controller-input branch and peripheral.joystick compiling for android.
The only necessary change for peripheral.joystick seems to be
https://github.com/Montellese/peripheral...480f07ba0a but I haven't built Kodi yet and I haven't looked into joystick support yet which might be tricky because IIRC from my work on the initial Kodi fork you need the main activity and its environment to access any kind of input events.
I started porting to android in
c7755afb6. The main strategy is to connect android joysticks to some kind of bus (possibly the existing "addon" or "application" bus, or a new "JNI" bus). Then, they'll show up in the peripherals manager. After that, the bus needs to call OnButtonMotion(), and OnAxisMotion() on the appropriate peripheral, and things should work.
Yeah that's what I thought as well. I just wanted to check first if it would be possible to do it in peripheral.joystick like all other joystick APIs that we support. I would probably create a new CPeripheralBus implementation specific to Android as the NDK provides a generic interface for all joysticks. It's different from the addon implementation IMO.
OK after spending some time on bringing my android buildsystem back up to speed and setting up my ADT-1 for development again I have extended some of the JNI wrappers to access the android InputManager and more properties of the InputDevice class. Then I've implemented a CPeripheralBusAndroid class which is able to read all controllers. It however ignores everything except joysticks and gamepads as it actually lists virtual, GPIO and keyboard devices as well.
The controllers aren't shown in the Peripherals list yet but haven't had time to look into that yet.
Figured it out
It's not that great yet. It simply polls the list of available input devices. I haven't managed to get the callbacks/events for new/changed/removed devices working yet. It always crashes Kodi. I probably messed up some JNI call but I've never done callbacks so far.
Either way now that I have the controllers I can look at forwarding the input events to the new peripheral bus and implement ProcessEvents(). Unfortunately that's not gonna happen before the weekend
@garbear: should we disable building peripheral.joystick for android as it won't be used?
No, peripheral.joystick is still used to store and (soon) generate button maps