Fix HTML5 gamepad logic for Emscripten 1.38.22 compat breakage

(cherry picked from commit 0d47dccda9)
This commit is contained in:
Leon Krause 2019-01-19 19:39:17 +01:00 committed by Rémi Verschelde
parent ed8e61dc5d
commit 8535939b27
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -716,7 +716,10 @@ bool OS_JavaScript::main_loop_iterate() {
/* clang-format on */
}
}
process_joysticks();
if (emscripten_sample_gamepad_data() == EMSCRIPTEN_RESULT_SUCCESS)
process_joysticks();
return Main::iteration();
}