emscripten: Fixed not removing pointer lock event callback.

This commit is contained in:
Philipp Wiesemann 2017-05-13 23:00:35 +02:00
parent cc5b4f450a
commit 29222db7f6
1 changed files with 2 additions and 1 deletions

View File

@ -676,6 +676,8 @@ Emscripten_UnregisterEventHandlers(SDL_WindowData *data)
emscripten_set_touchmove_callback("#canvas", NULL, 0, NULL);
emscripten_set_touchcancel_callback("#canvas", NULL, 0, NULL);
emscripten_set_pointerlockchange_callback(NULL, NULL, 0, NULL);
const char *target = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT);
if (!target) {
target = "#window";
@ -683,7 +685,6 @@ Emscripten_UnregisterEventHandlers(SDL_WindowData *data)
emscripten_set_keydown_callback(target, NULL, 0, NULL);
emscripten_set_keyup_callback(target, NULL, 0, NULL);
emscripten_set_keypress_callback(target, NULL, 0, NULL);
emscripten_set_fullscreenchange_callback("#document", NULL, 0, NULL);