diff options
author | punto- <ariel@godotengine.org> | 2016-01-20 22:55:20 -0300 |
---|---|---|
committer | punto- <ariel@godotengine.org> | 2016-01-20 22:55:20 -0300 |
commit | 8d057a6e48e414f5adf9aaa9e13dca5ffe8d59f0 (patch) | |
tree | f91ddcd75e4f38cb2aac286d53bd29a8a4fec53f /platform/javascript/os_javascript.h | |
parent | fcae3fb3bab25b588921e84ce43924c830b18dc5 (diff) | |
parent | 77858b66d3f357b8a9b581ae84a52dc802a9d3ad (diff) |
Merge pull request #3400 from Hinsbart/html5-gamepad
html5 gamepad support
Diffstat (limited to 'platform/javascript/os_javascript.h')
-rw-r--r-- | platform/javascript/os_javascript.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 61eecd8f32..ec3a6cf911 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -41,6 +41,7 @@ #include "audio_server_javascript.h" #include "audio_driver_javascript.h" #include "main/input_default.h" +#include "emscripten/html5.h" typedef void (*GFXInitFunc)(void *ud,bool gl2,int w, int h, bool fs); typedef int (*OpenURIFunc)(const String&); @@ -90,6 +91,8 @@ private: static void _close_notification_funcs(const String& p_file,int p_flags); + void process_joysticks(); + public: // functions used by main to initialize/deintialize the OS @@ -163,6 +166,11 @@ public: void process_accelerometer(const Vector3& p_accelerometer); void process_touch(int p_what,int p_pointer, const Vector<TouchPos>& p_points); void push_input(const InputEvent& p_ev); + + virtual bool is_joy_known(int p_device); + virtual String get_joy_guid(int p_device) const; + bool joy_connection_changed(int p_type, const EmscriptenGamepadEvent *p_event); + OS_JavaScript(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func); ~OS_JavaScript(); |