Add some joystick functions to input. Enables manipulation of mapping…
Created by: Hinsbart
…s at runtime
The following functions were added to Input
:
add_joy_mapping(String mapping, bool update_existing)
and remove_joy_mapping(String guid)
for manipulation of gamepad mappings.
bool is_joy_known(int device)
defaults to true on all platforms that don't use the remapping code. Otherwise, checks whether the device is mapped.
get_joy_guid(int device)
returns the sdl2 device guid if using remapping, defaults to "Default Gamepad"
I also documented these and the other joystick related functions. doctool updated quite a bit of things unrelated to this, I hope that's not a problem.
Also I hope the implementation is ok. I added is_joy_known
and get_joy_guid
to OS
for the default variants. Platforms that use the remapping then override these to call back to InputDefault