Recast: add support for horizontal scroll wheels

Properly check both scroll values.
This commit is contained in:
Kawe Mazidjatari 2024-07-15 16:37:54 +02:00
parent 2db0f40ec1
commit 15c809413f

View File

@ -646,7 +646,7 @@ int not_main(int argc, char** argv)
break;
case SDL_MOUSEWHEEL:
if (event.wheel.y < 0)
if (event.wheel.x < 0 || event.wheel.y < 0)
{
// wheel down
if (mouseOverMenu)
@ -658,7 +658,7 @@ int not_main(int argc, char** argv)
scrollZoom += 120.0f;
}
}
else
else if (event.wheel.x > 0 || event.wheel.y > 0)
{
if (mouseOverMenu)
{