PF_Sandbox icon indicating copy to clipboard operation
PF_Sandbox copied to clipboard

Generic controller support

Open rukai opened this issue 8 years ago • 2 comments

Support controllers other then wiiU->GC adapter This library looks good: https://gitlab.com/Arvamer/gilrs

Will need to handle mapping from generic controller to GC controller:

  • Load serialized mapping data from files in the directory PF_Sandbox/controller_maps/ (created if doesnt exist)
  • Use the naming scheme: $osname-$controllerID.json
  • If the required mapping file does not exist:
    • create it with a known correct mapping stored in the binary
    • otherwise use a generic mapping that will certainly be wrong but from here the user can modify it to be correct.
  • Maybe have a controller debug mode (cli flag to enter mode) that prints the controller buttons/axis ids to stdout. so the user can figure out what ids to use in the mapping file

rukai avatar Apr 28 '17 11:04 rukai

Mostly implemented in: https://github.com/rukai/PF_Sandbox/commit/784f21ae04f4f29e135110b3fb90e23d401e8863

Mapping is already handled by gilrs, it grabs mappings from a database of SDL input maps.

Still need to provide an interface to generate custom sdl maps though. Maybe in a seperate exe? or maybe just cli flag? User needs to be able to access it without a functioning controller (its not mapped yet :P) Just run it, hit buttons corresponding to prompts, writes result to PF_Sandbox/sdl_maps.txt and closes.

PF Sandbox can then read in from PF_Sandbox/sdl_maps.txt and overwrite the maps used by gilrs.

rukai avatar Dec 04 '17 12:12 rukai

Everything in PF Sandbox is done, just need gilrs to support DInput on windows.

rukai avatar Jan 22 '18 19:01 rukai