src/video/emscripten/SDL_emscriptenevents.c
changeset 11067 f4d12a22446e
parent 11034 fcb1f3161d2e
child 11300 68a80d7afec3
equal deleted inserted replaced
11066:f39b145db3eb 11067:f4d12a22446e
   650     emscripten_set_touchstart_callback("#canvas", data, 0, Emscripten_HandleTouch);
   650     emscripten_set_touchstart_callback("#canvas", data, 0, Emscripten_HandleTouch);
   651     emscripten_set_touchend_callback("#canvas", data, 0, Emscripten_HandleTouch);
   651     emscripten_set_touchend_callback("#canvas", data, 0, Emscripten_HandleTouch);
   652     emscripten_set_touchmove_callback("#canvas", data, 0, Emscripten_HandleTouch);
   652     emscripten_set_touchmove_callback("#canvas", data, 0, Emscripten_HandleTouch);
   653     emscripten_set_touchcancel_callback("#canvas", data, 0, Emscripten_HandleTouch);
   653     emscripten_set_touchcancel_callback("#canvas", data, 0, Emscripten_HandleTouch);
   654 
   654 
   655     emscripten_set_pointerlockchange_callback(NULL, data, 0, Emscripten_HandlePointerLockChange);
   655     emscripten_set_pointerlockchange_callback("#document", data, 0, Emscripten_HandlePointerLockChange);
   656 
   656 
   657     /* Keyboard events are awkward */
   657     /* Keyboard events are awkward */
   658     keyElement = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT);
   658     keyElement = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT);
   659     if (!keyElement) keyElement = "#window";
   659     if (!keyElement) keyElement = "#window";
   660 
   660 
   691     emscripten_set_touchstart_callback("#canvas", NULL, 0, NULL);
   691     emscripten_set_touchstart_callback("#canvas", NULL, 0, NULL);
   692     emscripten_set_touchend_callback("#canvas", NULL, 0, NULL);
   692     emscripten_set_touchend_callback("#canvas", NULL, 0, NULL);
   693     emscripten_set_touchmove_callback("#canvas", NULL, 0, NULL);
   693     emscripten_set_touchmove_callback("#canvas", NULL, 0, NULL);
   694     emscripten_set_touchcancel_callback("#canvas", NULL, 0, NULL);
   694     emscripten_set_touchcancel_callback("#canvas", NULL, 0, NULL);
   695 
   695 
   696     emscripten_set_pointerlockchange_callback(NULL, NULL, 0, NULL);
   696     emscripten_set_pointerlockchange_callback("#document", NULL, 0, NULL);
   697 
   697 
   698     target = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT);
   698     target = SDL_GetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT);
   699     if (!target) {
   699     if (!target) {
   700         target = "#window";
   700         target = "#window";
   701     }
   701     }