diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-07 14:49:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 14:49:33 +0200 |
commit | 6d213909cb516207304900575ab5c2d9b79e4b20 (patch) | |
tree | b7378d846e8c5e573a8df79241a7bd28e33fc964 | |
parent | 4775d0797787d3f0c2fb571abe723055bbb2b6c5 (diff) | |
parent | 0c693595d68a0e9aa0b0381f86a57a65e2f95e74 (diff) |
Merge pull request #10105 from eska014/html5-touch-hint
Implement OS.has_touchscreen_ui_hint() in HTML5 platform
-rw-r--r-- | platform/javascript/os_javascript.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index fbba1dd158..5513fca809 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -872,7 +872,11 @@ void OS_JavaScript::process_accelerometer(const Vector3 &p_accelerometer) { bool OS_JavaScript::has_touchscreen_ui_hint() const { - return false; //??? + /* clang-format off */ + return EM_ASM_INT_V( + return 'ontouchstart' in window; + ); + /* clang-format on */ } void OS_JavaScript::main_loop_request_quit() { |