diff --git a/Source/DiabloUI/diabloui.cpp b/Source/DiabloUI/diabloui.cpp index ec5008e7a..cd724b066 100644 --- a/Source/DiabloUI/diabloui.cpp +++ b/Source/DiabloUI/diabloui.cpp @@ -352,7 +352,7 @@ void UiFocusNavigation(SDL_Event *event) if (HandleMenuAction(GetMenuAction(*event))) return; -#ifndef USE_SDL1 +#if SDL_VERSION_ATLEAST(2, 0, 0) if (event->type == SDL_MOUSEWHEEL) { if (event->wheel.y > 0) { UiFocusUp(); @@ -361,6 +361,17 @@ void UiFocusNavigation(SDL_Event *event) } return; } +#else + if (event->type == SDL_MOUSEBUTTONDOWN) { + switch (event->button.button) { + case SDL_BUTTON_WHEELUP: + UiFocusUp(); + return; + case SDL_BUTTON_WHEELDOWN: + UiFocusDown(); + return; + } + } #endif if (textInputActive) {