Browse Source

fix scrolling bug in main game when SDL is at least 2

pull/8264/head
Chris V. 4 months ago committed by Anders Jenbo
parent
commit
8037515557
  1. 5
      Source/diablo.cpp

5
Source/diablo.cpp

@ -789,7 +789,7 @@ void GameEventHandler(const SDL_Event &event, uint16_t modState)
return;
#if SDL_VERSION_ATLEAST(2, 0, 0)
case SDL_EVENT_MOUSE_WHEEL:
if (SDLC_EventWheelIntY(event)) { // Up
if (SDLC_EventWheelIntY(event) > 0) { // Up
if (IsPlayerInStore()) {
StoreUp();
} else if (QuestLogIsOpen) {
@ -807,7 +807,7 @@ void GameEventHandler(const SDL_Event &event, uint16_t modState)
} else {
KeymapperPress(MouseScrollUpButton);
}
} else if (SDLC_EventWheelIntY(event)) { // down
} else if (SDLC_EventWheelIntY(event) < 0) { // down
if (IsPlayerInStore()) {
StoreDown();
} else if (QuestLogIsOpen) {
@ -3471,3 +3471,4 @@ void PrintScreen(SDL_Keycode vkey)
}
} // namespace devilution

Loading…
Cancel
Save