You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Implement touch-screen check in HTML5 platform
This commit is contained in:
@@ -857,7 +857,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() {
|
||||
|
||||
Reference in New Issue
Block a user