Skip to content
Permalink
Browse files

use SDL_SetMouseFocus

  • Loading branch information
Daft-Freak committed Sep 13, 2016
1 parent bdca510 commit cd05184f9b9859192f12bfdefdc8d6aa3e9053b6
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/video/emscripten/SDL_emscriptenevents.c
@@ -349,7 +349,8 @@ EM_BOOL
Emscripten_HandleMouseFocus(int eventType, const EmscriptenMouseEvent *mouseEvent, void *userData)
{
SDL_WindowData *window_data = userData;
SDL_SendWindowEvent(window_data->window, eventType == EMSCRIPTEN_EVENT_MOUSEENTER ? SDL_WINDOWEVENT_ENTER : SDL_WINDOWEVENT_LEAVE, 0, 0);

SDL_SetMouseFocus(eventType == EMSCRIPTEN_EVENT_MOUSEENTER ? window_data->window : NULL);
return 1;
}

0 comments on commit cd05184

Please sign in to comment.