mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
[HTML5] Custom Gamepad library to allow remapping.
No longer use emscripten functions for gamepads, implement them as library functions in library_godot_display.js instead. This allows us to do a better job at "guessing" vendorId, productId, OS, etc. thus allowing us to better find the remapping for the controller.
This commit is contained in:
parent
ea89e73a88
commit
31b5c5ee03
5 changed files with 226 additions and 55 deletions
|
|
@ -89,7 +89,7 @@ private:
|
|||
static EM_BOOL touch_press_callback(int p_event_type, const EmscriptenTouchEvent *p_event, void *p_user_data);
|
||||
static EM_BOOL touchmove_callback(int p_event_type, const EmscriptenTouchEvent *p_event, void *p_user_data);
|
||||
|
||||
static EM_BOOL gamepad_change_callback(int p_event_type, const EmscriptenGamepadEvent *p_event, void *p_user_data);
|
||||
static void gamepad_callback(int p_index, int p_connected, const char *p_id, const char *p_guid);
|
||||
void process_joypads();
|
||||
|
||||
static void file_access_close_callback(const String &p_file, int p_flags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue