Browse Source

Fix HTML5 gamepad logic for Emscripten 1.38.22 compat breakage

Leon Krause 6 years ago
parent
commit
0d47dccda9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      platform/javascript/os_javascript.cpp

+ 2 - 1
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) {