src/video/emscripten/SDL_emscriptenevents.c
changeset 11300 68a80d7afec3
parent 11067 f4d12a22446e
child 11811 5d94cb6b24d3
equal deleted inserted replaced
11299:349866a6eba0 11300:68a80d7afec3
   398 
   398 
   399 static EM_BOOL
   399 static EM_BOOL
   400 Emscripten_HandleWheel(int eventType, const EmscriptenWheelEvent *wheelEvent, void *userData)
   400 Emscripten_HandleWheel(int eventType, const EmscriptenWheelEvent *wheelEvent, void *userData)
   401 {
   401 {
   402     SDL_WindowData *window_data = userData;
   402     SDL_WindowData *window_data = userData;
   403     SDL_SendMouseWheel(window_data->window, 0, wheelEvent->deltaX, -wheelEvent->deltaY, SDL_MOUSEWHEEL_NORMAL);
   403     SDL_SendMouseWheel(window_data->window, 0, (float)wheelEvent->deltaX, (float)-wheelEvent->deltaY, SDL_MOUSEWHEEL_NORMAL);
   404     return SDL_GetEventState(SDL_MOUSEWHEEL) == SDL_ENABLE;
   404     return SDL_GetEventState(SDL_MOUSEWHEEL) == SDL_ENABLE;
   405 }
   405 }
   406 
   406 
   407 static EM_BOOL
   407 static EM_BOOL
   408 Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, void *userData)
   408 Emscripten_HandleFocus(int eventType, const EmscriptenFocusEvent *wheelEvent, void *userData)