Skip to content

Commit

Permalink
use SDL_SetMouseFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Sep 13, 2016
1 parent bdca510 commit cd05184
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/emscripten/SDL_emscriptenevents.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit cd05184

Please sign in to comment.