Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add axis specific last win SOCD cleaning #1119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions headers/addons/dualdirectional.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class DualDirectionalInput : public GPAddon {
uint8_t filterToFourWayModeDDI(uint8_t dpad);
void SOCDDualClean(SOCDMode);
uint8_t SOCDCombine(SOCDMode, uint8_t);
uint8_t SOCDGamepadClean(uint8_t, bool isLastWin);
uint8_t SOCDGamepadClean(SOCDMode mode, uint8_t gamepadState);
void OverrideGamepad(Gamepad *, DpadMode, uint8_t);
const SOCDMode getSOCDMode(const GamepadOptions&);
uint8_t dualState; // Dual Directional State
DpadDirection lastGPUD; // Gamepad Last Up-Down
DpadDirection lastGPLR; // Gamepad Last Left-Right
DpadDirection lastDualUD; // Dual Last Up-Down
DpadDirection lastDualLR; // Gamepad Last Left-Right
DpadDirection lastDualLR; // Dual Last Left-Right
DpadMode dpadMode;
GamepadButtonMapping *mapDpadUp;
GamepadButtonMapping *mapDpadDown;
Expand Down
2 changes: 2 additions & 0 deletions headers/addons/slider_socd.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class SliderSOCDInput : public GPAddon {
Mask_t secondInputModeMask = 0;
Mask_t firstInputModeMask = 0;
Mask_t bypassModeMask = 0;
Mask_t yAxisSecondInputModeMask = 0;
Mask_t xAxisSecondInputModeMask = 0;
};

#endif // _SliderSOCD_H_
214 changes: 110 additions & 104 deletions proto/enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,13 @@ enum SOCDMode
{
option (nanopb_enumopt).long_names = false;

SOCD_MODE_UP_PRIORITY = 0; // U+D=U, L+R=N
SOCD_MODE_NEUTRAL = 1; // U+D=N, L+R=N
SOCD_MODE_SECOND_INPUT_PRIORITY = 2; // U>D=D, L>R=R (Last Input Priority, aka Last Win)
SOCD_MODE_FIRST_INPUT_PRIORITY = 3; // U>D=U, L>R=L (First Input Priority, aka First Win)
SOCD_MODE_BYPASS = 4; // U+D=UD, L+R=LR (No cleaning applied)
SOCD_MODE_UP_PRIORITY = 0; // U+D=U, L+R=N
SOCD_MODE_NEUTRAL = 1; // U+D=N, L+R=N
SOCD_MODE_SECOND_INPUT_PRIORITY = 2; // U>D=D, L>R=R (Last Input Priority, aka Last Win)
SOCD_MODE_FIRST_INPUT_PRIORITY = 3; // U>D=U, L>R=L (First Input Priority, aka First Win)
SOCD_MODE_BYPASS = 4; // U+D=UD, L+R=LR (No cleaning applied)
SOCD_MODE_Y_AXIS_SECOND_INPUT_PRIORITY = 5; // U>D=D, L+R=N (Last Input Priority on Y-Axis, Neutral on X-Axis)
SOCD_MODE_X_AXIS_SECOND_INPUT_PRIORITY = 6; // U+D=N, L>R=R (Last Input Priority on X-Axis, Neutral on Y-Axis)
}

enum GpioAction
Expand All @@ -186,63 +188,65 @@ enum GpioAction

// the lowest value is the default, which should be NONE;
// reserving some numbers in case we need more not-mapped type values
NONE = -10;
RESERVED = -5;
ASSIGNED_TO_ADDON = 0;
BUTTON_PRESS_UP = 1;
BUTTON_PRESS_DOWN = 2;
BUTTON_PRESS_LEFT = 3;
BUTTON_PRESS_RIGHT = 4;
BUTTON_PRESS_B1 = 5;
BUTTON_PRESS_B2 = 6;
BUTTON_PRESS_B3 = 7;
BUTTON_PRESS_B4 = 8;
BUTTON_PRESS_L1 = 9;
BUTTON_PRESS_R1 = 10;
BUTTON_PRESS_L2 = 11;
BUTTON_PRESS_R2 = 12;
BUTTON_PRESS_S1 = 13;
BUTTON_PRESS_S2 = 14;
BUTTON_PRESS_A1 = 15;
BUTTON_PRESS_A2 = 16;
BUTTON_PRESS_L3 = 17;
BUTTON_PRESS_R3 = 18;
BUTTON_PRESS_FN = 19;
BUTTON_PRESS_DDI_UP = 20;
BUTTON_PRESS_DDI_DOWN = 21;
BUTTON_PRESS_DDI_LEFT = 22;
BUTTON_PRESS_DDI_RIGHT = 23;
SUSTAIN_DP_MODE_DP = 24;
SUSTAIN_DP_MODE_LS = 25;
SUSTAIN_DP_MODE_RS = 26;
SUSTAIN_SOCD_MODE_UP_PRIO = 27;
SUSTAIN_SOCD_MODE_NEUTRAL = 28;
SUSTAIN_SOCD_MODE_SECOND_WIN = 29;
SUSTAIN_SOCD_MODE_FIRST_WIN = 30;
SUSTAIN_SOCD_MODE_BYPASS = 31;
BUTTON_PRESS_TURBO = 32;
BUTTON_PRESS_MACRO = 33;
BUTTON_PRESS_MACRO_1 = 34;
BUTTON_PRESS_MACRO_2 = 35;
BUTTON_PRESS_MACRO_3 = 36;
BUTTON_PRESS_MACRO_4 = 37;
BUTTON_PRESS_MACRO_5 = 38;
BUTTON_PRESS_MACRO_6 = 39;
CUSTOM_BUTTON_COMBO = 40;
BUTTON_PRESS_A3 = 41;
BUTTON_PRESS_A4 = 42;
BUTTON_PRESS_E1 = 43;
BUTTON_PRESS_E2 = 44;
BUTTON_PRESS_E3 = 45;
BUTTON_PRESS_E4 = 46;
BUTTON_PRESS_E5 = 47;
BUTTON_PRESS_E6 = 48;
BUTTON_PRESS_E7 = 49;
BUTTON_PRESS_E8 = 50;
BUTTON_PRESS_E9 = 51;
BUTTON_PRESS_E10 = 52;
BUTTON_PRESS_E11 = 53;
BUTTON_PRESS_E12 = 54;
NONE = -10;
RESERVED = -5;
ASSIGNED_TO_ADDON = 0;
BUTTON_PRESS_UP = 1;
BUTTON_PRESS_DOWN = 2;
BUTTON_PRESS_LEFT = 3;
BUTTON_PRESS_RIGHT = 4;
BUTTON_PRESS_B1 = 5;
BUTTON_PRESS_B2 = 6;
BUTTON_PRESS_B3 = 7;
BUTTON_PRESS_B4 = 8;
BUTTON_PRESS_L1 = 9;
BUTTON_PRESS_R1 = 10;
BUTTON_PRESS_L2 = 11;
BUTTON_PRESS_R2 = 12;
BUTTON_PRESS_S1 = 13;
BUTTON_PRESS_S2 = 14;
BUTTON_PRESS_A1 = 15;
BUTTON_PRESS_A2 = 16;
BUTTON_PRESS_L3 = 17;
BUTTON_PRESS_R3 = 18;
BUTTON_PRESS_FN = 19;
BUTTON_PRESS_DDI_UP = 20;
BUTTON_PRESS_DDI_DOWN = 21;
BUTTON_PRESS_DDI_LEFT = 22;
BUTTON_PRESS_DDI_RIGHT = 23;
SUSTAIN_DP_MODE_DP = 24;
SUSTAIN_DP_MODE_LS = 25;
SUSTAIN_DP_MODE_RS = 26;
SUSTAIN_SOCD_MODE_UP_PRIO = 27;
SUSTAIN_SOCD_MODE_NEUTRAL = 28;
SUSTAIN_SOCD_MODE_SECOND_WIN = 29;
SUSTAIN_SOCD_MODE_FIRST_WIN = 30;
SUSTAIN_SOCD_MODE_BYPASS = 31;
BUTTON_PRESS_TURBO = 32;
BUTTON_PRESS_MACRO = 33;
BUTTON_PRESS_MACRO_1 = 34;
BUTTON_PRESS_MACRO_2 = 35;
BUTTON_PRESS_MACRO_3 = 36;
BUTTON_PRESS_MACRO_4 = 37;
BUTTON_PRESS_MACRO_5 = 38;
BUTTON_PRESS_MACRO_6 = 39;
CUSTOM_BUTTON_COMBO = 40;
BUTTON_PRESS_A3 = 41;
BUTTON_PRESS_A4 = 42;
BUTTON_PRESS_E1 = 43;
BUTTON_PRESS_E2 = 44;
BUTTON_PRESS_E3 = 45;
BUTTON_PRESS_E4 = 46;
BUTTON_PRESS_E5 = 47;
BUTTON_PRESS_E6 = 48;
BUTTON_PRESS_E7 = 49;
BUTTON_PRESS_E8 = 50;
BUTTON_PRESS_E9 = 51;
BUTTON_PRESS_E10 = 52;
BUTTON_PRESS_E11 = 53;
BUTTON_PRESS_E12 = 54;
SUSTAIN_SOCD_MODE_Y_AXIS_SECOND_WIN = 55;
SUSTAIN_SOCD_MODE_X_AXIS_SECOND_WIN = 56;
}

enum GpioDirection
Expand All @@ -257,48 +261,50 @@ enum GamepadHotkey
{
option (nanopb_enumopt).long_names = false;

HOTKEY_NONE = 0;
HOTKEY_DPAD_DIGITAL = 1;
HOTKEY_DPAD_LEFT_ANALOG = 2;
HOTKEY_DPAD_RIGHT_ANALOG = 3;
HOTKEY_HOME_BUTTON = 4;
HOTKEY_CAPTURE_BUTTON = 5;
HOTKEY_SOCD_UP_PRIORITY = 6;
HOTKEY_SOCD_NEUTRAL = 7;
HOTKEY_SOCD_LAST_INPUT = 8;
HOTKEY_INVERT_X_AXIS = 9;
HOTKEY_INVERT_Y_AXIS = 10;
HOTKEY_SOCD_FIRST_INPUT = 11;
HOTKEY_SOCD_BYPASS = 12;
HOTKEY_TOGGLE_4_WAY_MODE = 13;
HOTKEY_TOGGLE_DDI_4_WAY_MODE = 14;
HOTKEY_LOAD_PROFILE_1 = 15;
HOTKEY_LOAD_PROFILE_2 = 16;
HOTKEY_LOAD_PROFILE_3 = 17;
HOTKEY_LOAD_PROFILE_4 = 18;
HOTKEY_L3_BUTTON = 19;
HOTKEY_R3_BUTTON = 20;
HOTKEY_TOUCHPAD_BUTTON = 21;
HOTKEY_REBOOT_DEFAULT = 22;
HOTKEY_B1_BUTTON = 23;
HOTKEY_B2_BUTTON = 24;
HOTKEY_B3_BUTTON = 25;
HOTKEY_B4_BUTTON = 26;
HOTKEY_L1_BUTTON = 27;
HOTKEY_R1_BUTTON = 28;
HOTKEY_L2_BUTTON = 29;
HOTKEY_R2_BUTTON = 30;
HOTKEY_S1_BUTTON = 31;
HOTKEY_S2_BUTTON = 32;
HOTKEY_A1_BUTTON = 33;
HOTKEY_A2_BUTTON = 34;
HOTKEY_NEXT_PROFILE = 35;
HOTKEY_A3_BUTTON = 36;
HOTKEY_A4_BUTTON = 37;
HOTKEY_DPAD_UP = 38;
HOTKEY_DPAD_DOWN = 39;
HOTKEY_DPAD_LEFT = 40;
HOTKEY_DPAD_RIGHT = 41;
HOTKEY_NONE = 0;
HOTKEY_DPAD_DIGITAL = 1;
HOTKEY_DPAD_LEFT_ANALOG = 2;
HOTKEY_DPAD_RIGHT_ANALOG = 3;
HOTKEY_HOME_BUTTON = 4;
HOTKEY_CAPTURE_BUTTON = 5;
HOTKEY_SOCD_UP_PRIORITY = 6;
HOTKEY_SOCD_NEUTRAL = 7;
HOTKEY_SOCD_LAST_INPUT = 8;
HOTKEY_INVERT_X_AXIS = 9;
HOTKEY_INVERT_Y_AXIS = 10;
HOTKEY_SOCD_FIRST_INPUT = 11;
HOTKEY_SOCD_BYPASS = 12;
HOTKEY_TOGGLE_4_WAY_MODE = 13;
HOTKEY_TOGGLE_DDI_4_WAY_MODE = 14;
HOTKEY_LOAD_PROFILE_1 = 15;
HOTKEY_LOAD_PROFILE_2 = 16;
HOTKEY_LOAD_PROFILE_3 = 17;
HOTKEY_LOAD_PROFILE_4 = 18;
HOTKEY_L3_BUTTON = 19;
HOTKEY_R3_BUTTON = 20;
HOTKEY_TOUCHPAD_BUTTON = 21;
HOTKEY_REBOOT_DEFAULT = 22;
HOTKEY_B1_BUTTON = 23;
HOTKEY_B2_BUTTON = 24;
HOTKEY_B3_BUTTON = 25;
HOTKEY_B4_BUTTON = 26;
HOTKEY_L1_BUTTON = 27;
HOTKEY_R1_BUTTON = 28;
HOTKEY_L2_BUTTON = 29;
HOTKEY_R2_BUTTON = 30;
HOTKEY_S1_BUTTON = 31;
HOTKEY_S2_BUTTON = 32;
HOTKEY_A1_BUTTON = 33;
HOTKEY_A2_BUTTON = 34;
HOTKEY_NEXT_PROFILE = 35;
HOTKEY_A3_BUTTON = 36;
HOTKEY_A4_BUTTON = 37;
HOTKEY_DPAD_UP = 38;
HOTKEY_DPAD_DOWN = 39;
HOTKEY_DPAD_LEFT = 40;
HOTKEY_DPAD_RIGHT = 41;
HOTKEY_SOCD_Y_AXIS_LAST_INPUT = 42;
HOTKEY_SOCD_X_AXIS_LAST_INPUT = 43;
}

// This has to be kept in sync with LEDFormat in NeoPico.hpp
Expand Down
31 changes: 18 additions & 13 deletions src/addons/dualdirectional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void DualDirectionalInput::process()
dualOut = SOCDCombine(socdMode, gamepadDpad);
} else if ( socdMode != SOCD_MODE_BYPASS ) {
// else if not bypass, what's left is first/last input wins SOCD, which need a complicated re-clean
dualOut = SOCDGamepadClean(dualOut | gamepadDpad, socdMode == SOCD_MODE_SECOND_INPUT_PRIORITY);
dualOut = SOCDGamepadClean(socdMode, dualOut | gamepadDpad);
} else {
// this is bypass SOCD, just OR them together
dualOut |= gamepadDpad;
Expand Down Expand Up @@ -176,12 +176,16 @@ void DualDirectionalInput::OverrideGamepad(Gamepad * gamepad, DpadMode mode, uin
}
}

uint8_t DualDirectionalInput::SOCDGamepadClean(uint8_t gamepadState, bool isLastWin) {
uint8_t DualDirectionalInput::SOCDGamepadClean(SOCDMode mode, uint8_t gamepadState) {
// Gamepad SOCD Last-Win OR First-Win Clean
switch (gamepadState & (GAMEPAD_MASK_UP | GAMEPAD_MASK_DOWN)) {
case (GAMEPAD_MASK_UP | GAMEPAD_MASK_DOWN): // If last state was Up or Down, exclude it from our gamepad
if (isLastWin) gamepadState ^= (lastGPUD == DIRECTION_UP) ? GAMEPAD_MASK_UP : GAMEPAD_MASK_DOWN;
else gamepadState ^= (lastGPUD == DIRECTION_UP) ? GAMEPAD_MASK_DOWN : GAMEPAD_MASK_UP;
if (mode == SOCD_MODE_SECOND_INPUT_PRIORITY || mode == SOCD_MODE_Y_AXIS_SECOND_INPUT_PRIORITY)
gamepadState ^= (lastGPUD == DIRECTION_UP) ? GAMEPAD_MASK_UP : GAMEPAD_MASK_DOWN;
else if (mode == SOCD_MODE_FIRST_INPUT_PRIORITY)
gamepadState ^= (lastGPUD == DIRECTION_UP) ? GAMEPAD_MASK_DOWN : GAMEPAD_MASK_UP;
else
gamepadState ^= (GAMEPAD_MASK_UP | GAMEPAD_MASK_DOWN);
break;
case GAMEPAD_MASK_UP:
gamepadState |= GAMEPAD_MASK_UP;
Expand All @@ -197,11 +201,12 @@ uint8_t DualDirectionalInput::SOCDGamepadClean(uint8_t gamepadState, bool isLast
}
switch (gamepadState & (GAMEPAD_MASK_LEFT | GAMEPAD_MASK_RIGHT)) {
case (GAMEPAD_MASK_LEFT | GAMEPAD_MASK_RIGHT):
if (lastGPLR != DIRECTION_NONE)
if (isLastWin) gamepadState ^= (lastGPLR == DIRECTION_LEFT) ? GAMEPAD_MASK_LEFT : GAMEPAD_MASK_RIGHT;
else gamepadState ^= (lastGPLR == DIRECTION_LEFT) ? GAMEPAD_MASK_RIGHT : GAMEPAD_MASK_LEFT;
else
lastGPLR = DIRECTION_NONE;
if (mode == SOCD_MODE_SECOND_INPUT_PRIORITY || mode == SOCD_MODE_X_AXIS_SECOND_INPUT_PRIORITY)
gamepadState ^= (lastGPLR == DIRECTION_LEFT) ? GAMEPAD_MASK_LEFT : GAMEPAD_MASK_RIGHT;
else if (mode == SOCD_MODE_FIRST_INPUT_PRIORITY)
gamepadState ^= (lastGPLR == DIRECTION_LEFT) ? GAMEPAD_MASK_RIGHT : GAMEPAD_MASK_LEFT;
else
gamepadState ^= (GAMEPAD_MASK_LEFT | GAMEPAD_MASK_RIGHT);
break;
case GAMEPAD_MASK_LEFT:
gamepadState |= GAMEPAD_MASK_LEFT;
Expand Down Expand Up @@ -247,7 +252,7 @@ uint8_t DualDirectionalInput::SOCDCombine(SOCDMode mode, uint8_t gamepadState) {
return outState;
}

void DualDirectionalInput::SOCDDualClean(SOCDMode socdMode) {
void DualDirectionalInput::SOCDDualClean(SOCDMode socdMode) {
if (socdMode == SOCD_MODE_BYPASS) {
return;
}
Expand All @@ -258,7 +263,7 @@ void DualDirectionalInput::SOCDDualClean(SOCDMode socdMode) {
if ( socdMode == SOCD_MODE_UP_PRIORITY ) {
dualState ^= GAMEPAD_MASK_DOWN; // Remove Down
lastDualUD = DIRECTION_UP; // We're in UP mode
} else if ( socdMode == SOCD_MODE_SECOND_INPUT_PRIORITY && lastDualUD != DIRECTION_NONE ) {
} else if ( (socdMode == SOCD_MODE_SECOND_INPUT_PRIORITY || socdMode == SOCD_MODE_Y_AXIS_SECOND_INPUT_PRIORITY) && lastDualUD != DIRECTION_NONE ) {
dualState ^= (lastDualUD == DIRECTION_UP) ? GAMEPAD_MASK_UP : GAMEPAD_MASK_DOWN;
} else if ( socdMode == SOCD_MODE_FIRST_INPUT_PRIORITY && lastDualUD != DIRECTION_NONE ) {
dualState ^= (lastDualUD == DIRECTION_UP) ? GAMEPAD_MASK_DOWN : GAMEPAD_MASK_UP;
Expand All @@ -282,9 +287,9 @@ void DualDirectionalInput::SOCDDualClean(SOCDMode socdMode) {
if ( socdMode == SOCD_MODE_UP_PRIORITY || socdMode == SOCD_MODE_NEUTRAL ) {
dualState ^= (GAMEPAD_MASK_LEFT | GAMEPAD_MASK_RIGHT); // Remove L + R to Neutral
lastDualLR = DIRECTION_NONE;
} else if ( socdMode == SOCD_MODE_SECOND_INPUT_PRIORITY || socdMode == SOCD_MODE_FIRST_INPUT_PRIORITY ) {
} else if ( socdMode == SOCD_MODE_SECOND_INPUT_PRIORITY || socdMode == SOCD_MODE_X_AXIS_SECOND_INPUT_PRIORITY || socdMode == SOCD_MODE_FIRST_INPUT_PRIORITY ) {
if (lastDualLR != DIRECTION_NONE)
if (socdMode == SOCD_MODE_SECOND_INPUT_PRIORITY) dualState ^= (lastDualLR == DIRECTION_LEFT) ? GAMEPAD_MASK_LEFT : GAMEPAD_MASK_RIGHT; // Last Win
if (socdMode == SOCD_MODE_SECOND_INPUT_PRIORITY || socdMode == SOCD_MODE_X_AXIS_SECOND_INPUT_PRIORITY) dualState ^= (lastDualLR == DIRECTION_LEFT) ? GAMEPAD_MASK_LEFT : GAMEPAD_MASK_RIGHT; // Last Win
else dualState ^= (lastDualLR == DIRECTION_LEFT) ? GAMEPAD_MASK_RIGHT : GAMEPAD_MASK_LEFT; // First Win
else
lastDualLR = DIRECTION_NONE;
Expand Down
18 changes: 11 additions & 7 deletions src/addons/slider_socd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#include "GamepadEnums.h"

#define SOCD_MODE_MASK (SOCD_MODE_UP_PRIORITY & SOCD_MODE_SECOND_INPUT_PRIORITY & SOCD_MODE_FIRST_INPUT_PRIORITY & SOCD_MODE_NEUTRAL)

bool SliderSOCDInput::available() {
const SOCDSliderOptions& options = Storage::getInstance().getAddonOptions().socdSliderOptions;
return options.enabled;
Expand All @@ -19,11 +17,13 @@ void SliderSOCDInput::setup()
for (Pin_t pin = 0; pin < (Pin_t)NUM_BANK0_GPIOS; pin++)
{
switch (pinMappings[pin].action) {
case SUSTAIN_SOCD_MODE_UP_PRIO: upPrioModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_NEUTRAL: neutralModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_SECOND_WIN: secondInputModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_FIRST_WIN: firstInputModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_BYPASS: bypassModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_UP_PRIO: upPrioModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_NEUTRAL: neutralModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_SECOND_WIN: secondInputModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_FIRST_WIN: firstInputModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_BYPASS: bypassModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_Y_AXIS_SECOND_WIN: yAxisSecondInputModeMask |= 1 << pin; break;
case SUSTAIN_SOCD_MODE_X_AXIS_SECOND_WIN: xAxisSecondInputModeMask |= 1 << pin; break;
default: break;
}
}
Expand All @@ -37,6 +37,8 @@ SOCDMode SliderSOCDInput::read() {
else if (values & secondInputModeMask) return SOCDMode::SOCD_MODE_SECOND_INPUT_PRIORITY;
else if (values & firstInputModeMask) return SOCDMode::SOCD_MODE_FIRST_INPUT_PRIORITY;
else if (values & bypassModeMask) return SOCDMode::SOCD_MODE_BYPASS;
else if (values & yAxisSecondInputModeMask) return SOCDMode::SOCD_MODE_Y_AXIS_SECOND_INPUT_PRIORITY;
else if (values & xAxisSecondInputModeMask) return SOCDMode::SOCD_MODE_X_AXIS_SECOND_INPUT_PRIORITY;
return options.modeDefault;
}

Expand All @@ -50,6 +52,8 @@ void SliderSOCDInput::reinit()
secondInputModeMask = 0;
firstInputModeMask = 0;
bypassModeMask = 0;
yAxisSecondInputModeMask = 0;
xAxisSecondInputModeMask = 0;
this->setup();
}

Expand Down
Loading