summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/javascript/os_javascript.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index cc3018716d..6824ed1803 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -970,7 +970,8 @@ bool OS_JavaScript::main_loop_iterate() {
}
}
- process_joypads();
+ if (emscripten_sample_gamepad_data() == EMSCRIPTEN_RESULT_SUCCESS)
+ process_joypads();
if (just_exited_fullscreen) {
if (window_maximized) {