GHOST/SDL: support horizontal scroll events
This commit is contained in:
@@ -605,8 +605,14 @@ void GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
|
||||
GHOST_WindowSDL *window = findGhostWindow(
|
||||
SDL_GetWindowFromID_fallback(sdl_sub_evt.windowID));
|
||||
assert(window != nullptr);
|
||||
g_event = new GHOST_EventWheel(
|
||||
event_ms, window, GHOST_kEventWheelAxisVertical, sdl_sub_evt.y);
|
||||
if (sdl_sub_evt.x != 0) {
|
||||
g_event = new GHOST_EventWheel(
|
||||
event_ms, window, GHOST_kEventWheelAxisHorizontal, sdl_sub_evt.x);
|
||||
}
|
||||
else if (sdl_sub_evt.y != 0) {
|
||||
g_event = new GHOST_EventWheel(
|
||||
event_ms, window, GHOST_kEventWheelAxisVertical, sdl_sub_evt.y);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SDL_KEYDOWN:
|
||||
|
||||
Reference in New Issue
Block a user