mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-20 10:25:43 +00:00
Add True and False tests for bitwise enums
This commit is contained in:
@@ -68,7 +68,7 @@ void DolphinSmashAdapter::transferCycle() {
|
||||
DolphinControllerState state;
|
||||
bool rumble = false;
|
||||
EDolphinControllerType type = parseState(&state, controller, rumble);
|
||||
if (type != EDolphinControllerType::None && !(m_knownControllers & 1 << i)) {
|
||||
if (True(type) && !(m_knownControllers & 1 << i)) {
|
||||
m_leftStickCal[0] = state.m_leftStick[0];
|
||||
m_leftStickCal[1] = state.m_leftStick[1];
|
||||
m_rightStickCal[0] = state.m_rightStick[0];
|
||||
@@ -77,7 +77,7 @@ void DolphinSmashAdapter::transferCycle() {
|
||||
m_triggersCal[1] = state.m_analogTriggers[1];
|
||||
m_knownControllers |= 1 << i;
|
||||
m_callback->controllerConnected(i, type);
|
||||
} else if (type == EDolphinControllerType::None && (m_knownControllers & 1 << i)) {
|
||||
} else if (False(type) && (m_knownControllers & 1 << i)) {
|
||||
m_knownControllers &= ~(1 << i);
|
||||
m_callback->controllerDisconnected(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user