Invert scroll X direction
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
ffbb543b68
commit
ba9ad5f2e5
1 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* DISTRHO Cardinal Plugin
|
* DISTRHO Cardinal Plugin
|
||||||
* Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
|
* Copyright (C) 2021-2023 Filipe Coelho <falktx@falktx.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
@ -974,9 +974,9 @@ protected:
|
||||||
|
|
||||||
switch (ev.button)
|
switch (ev.button)
|
||||||
{
|
{
|
||||||
case 1: button = GLFW_MOUSE_BUTTON_LEFT; break;
|
case kMouseButtonLeft: button = GLFW_MOUSE_BUTTON_LEFT; break;
|
||||||
case 2: button = GLFW_MOUSE_BUTTON_RIGHT; break;
|
case kMouseButtonRight: button = GLFW_MOUSE_BUTTON_RIGHT; break;
|
||||||
case 3: button = GLFW_MOUSE_BUTTON_MIDDLE; break;
|
case kMouseButtonMiddle: button = GLFW_MOUSE_BUTTON_MIDDLE; break;
|
||||||
default:
|
default:
|
||||||
button = ev.button;
|
button = ev.button;
|
||||||
break;
|
break;
|
||||||
|
@ -1020,7 +1020,7 @@ protected:
|
||||||
if (inSelfTest) return false;
|
if (inSelfTest) return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rack::math::Vec scrollDelta = rack::math::Vec(ev.delta.getX(), ev.delta.getY());
|
rack::math::Vec scrollDelta = rack::math::Vec(-ev.delta.getX(), ev.delta.getY());
|
||||||
#ifndef DISTRHO_OS_MAC
|
#ifndef DISTRHO_OS_MAC
|
||||||
scrollDelta = scrollDelta.mult(50.0);
|
scrollDelta = scrollDelta.mult(50.0);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue