Apple's official Game Controller Framework + API in iOS 7 and OS X 10.9?
#3
For reference, some very cool related work on APIs for input (peripheral) addons being worked on right by garbear here right now

http://forum.kodi.tv/showthread.php?tid=211138

(2014-12-18, 07:54)garbear Wrote: Now I have a little present for you Wink

As I mentioned before, I decided to move the platform-specific joystick code to binary add-ons. I created a new kind of add-on, "peripheral add-on", that can offer one or more types of peripherals. Currently, only joysticks can be offered. Next on my list, media readers like the Retrode will let you download ROMs from cartridges, launch games instantly by plugging them in, upload save games, etc. OFC we must "change one thing at a time". Media readers should only come after we've finished the API for joysticks.

The central repo for peripheral add-ons is now available at https://github.com/garbear/xbmc-peripheral-addons

The initial version supports 4 APIs: DirectInput, XInput (for windows), SDL v1 and the Linux Joystick API. The Joystick add-on is based on my work for RetroPlayer, so there's some SDL fixes between Gotham and Helix that need to be incorporated. Full list here: https://github.com/xbmc/xbmc/commits/Hel...ystick.cpp . The important change, SDLv1 -> SDLv2, is PR:5364

Windows and Linux build right now. I haven't finished implementing peripheral add-ons in Kodi yet. I'll try to finish by the weekend so that we can load the add-on and test it out.

The code is meant to be run both as an add-on and a standalone app, so until then, someone could easily test by replacing the addon.cpp entry point with a main.cpp and compiling as an executable. Logging will intelligently switch between stdout and Kodi's log system, depending on if the code is loaded as an add-on or run as an executable.

Feel free to play around with the joystick code so far. Joystick APIs and logging is included, the Key Mapper and persistent storage are still empty folders. Persistent storage for keymaps could include a local XML dump, frontend-provided storage like a central MySQL database, cloud storage, read-only remote databases (like the SDL Game Controller DB) and read-write remote DBs (to allow for "voting" on keymaps and data curation).
Reply


Messages In This Thread
RE: Apple's official Game Controller Framework + API in iOS 7 and OS X 10.9? - by Hedda - 2014-12-18, 11:17
Logout Mark Read Team Forum Stats Members Help
Apple's official Game Controller Framework + API in iOS 7 and OS X 10.9?0