Browse Source

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

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

Loading…
Cancel
Save