Skip to content
Permalink
Browse files

emscripten: Fixed not removing pointer lock event callback.

  • Loading branch information
philippwiesemann committed May 13, 2017
1 parent cc5b4f4 commit 29222db7f6f4c9379b95b2e2666024f6082c22a1
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/video/emscripten/SDL_emscriptenevents.c
@@ -676,14 +676,15 @@ 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";
}

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);

0 comments on commit 29222db

Please sign in to comment.