diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-01-18 13:12:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-18 13:12:54 +0100 |
commit | 869f5b53288ec713553e024f91ec88b47ce960d9 (patch) | |
tree | 1462d44f94daab7f896f9a08def8e0fa32585513 /platform/javascript/godot_js.h | |
parent | 688f4aebef57e77e843b52cfb97c31f3ea426c0e (diff) | |
parent | bab20c6e094cd40427fc76890c3aeef3a0ba4e1c (diff) | |
download | redot-engine-869f5b53288ec713553e024f91ec88b47ce960d9.tar.gz |
Merge pull request #45078 from Faless/js/4.x_gamepads
[HTML5] Use internal implementation of the Gamepad API.
Diffstat (limited to 'platform/javascript/godot_js.h')
-rw-r--r-- | platform/javascript/godot_js.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/javascript/godot_js.h b/platform/javascript/godot_js.h index 5b98253b08..0006848756 100644 --- a/platform/javascript/godot_js.h +++ b/platform/javascript/godot_js.h @@ -76,6 +76,12 @@ extern int godot_js_display_cursor_is_hidden(); extern void godot_js_display_cursor_set_custom_shape(const char *p_shape, const uint8_t *p_ptr, int p_len, int p_hotspot_x, int p_hotspot_y); extern void godot_js_display_cursor_set_visible(int p_visible); +// Display gamepad +extern char *godot_js_display_gamepad_cb(void (*p_on_change)(int p_index, int p_connected, const char *p_id, const char *p_guid)); +extern int godot_js_display_gamepad_sample(); +extern int godot_js_display_gamepad_sample_count(); +extern int godot_js_display_gamepad_sample_get(int p_idx, float r_btns[16], int32_t *r_btns_num, float r_axes[10], int32_t *r_axes_num, int32_t *r_standard); + // Display listeners extern void godot_js_display_notification_cb(void (*p_callback)(int p_notification), int p_enter, int p_exit, int p_in, int p_out); extern void godot_js_display_paste_cb(void (*p_callback)(const char *p_text)); |