Cleaned up if-else code and made pref check case-insenstive
This commit is contained in:
committed by
quietly-turning
parent
47d6d82962
commit
ad2825ba3c
@@ -63,28 +63,9 @@ LightsDriver_PacDrive::~LightsDriver_PacDrive()
|
||||
|
||||
void LightsDriver_PacDrive::Set(const LightsState *ls)
|
||||
{
|
||||
std::string lightOrder = g_sPacDriveLightOrdering.Get();
|
||||
RString lightOrder = g_sPacDriveLightOrdering.Get();
|
||||
short int outb = 0;
|
||||
if (lightOrder.empty() || lightOrder.compare("minimaid") == 0) {
|
||||
// Set the cabinet light values according to Minimaid order if no preference is set
|
||||
|
||||
if (ls->m_bCabinetLights[LIGHT_MARQUEE_UP_LEFT]) outb |= BIT(0);
|
||||
if (ls->m_bCabinetLights[LIGHT_MARQUEE_UP_RIGHT]) outb |= BIT(1);
|
||||
if (ls->m_bCabinetLights[LIGHT_MARQUEE_LR_LEFT]) outb |= BIT(2);
|
||||
if (ls->m_bCabinetLights[LIGHT_MARQUEE_LR_RIGHT]) outb |= BIT(3);
|
||||
if (ls->m_bCabinetLights[LIGHT_BASS_LEFT] || ls->m_bCabinetLights[LIGHT_BASS_RIGHT]) outb |= BIT(4);
|
||||
if (ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_LEFT]) outb |= BIT(5);
|
||||
if (ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_RIGHT]) outb |= BIT(6);
|
||||
if (ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_UP]) outb |= BIT(7);
|
||||
if (ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_DOWN]) outb |= BIT(8);
|
||||
if (ls->m_bGameButtonLights[GameController_1][GAME_BUTTON_START]) outb |= BIT(9);
|
||||
if (ls->m_bGameButtonLights[GameController_2][DANCE_BUTTON_LEFT]) outb |= BIT(10);
|
||||
if (ls->m_bGameButtonLights[GameController_2][DANCE_BUTTON_RIGHT]) outb |= BIT(11);
|
||||
if (ls->m_bGameButtonLights[GameController_2][DANCE_BUTTON_UP]) outb |= BIT(12);
|
||||
if (ls->m_bGameButtonLights[GameController_2][DANCE_BUTTON_DOWN]) outb |= BIT(13);
|
||||
if (ls->m_bGameButtonLights[GameController_2][GAME_BUTTON_START]) outb |= BIT(14);
|
||||
}
|
||||
else if (lightOrder.compare("lumenar") == 0 || lightOrder.compare("openitg") == 0) {
|
||||
if (lightOrder.CompareNoCase("lumenar") == 0 || lightOrder.CompareNoCase("openitg") == 0) {
|
||||
//Sets the cabinet light values to follow LumenAR/OpenITG wiring standards
|
||||
|
||||
if (ls->m_bGameButtonLights[GameController_1][DANCE_BUTTON_LEFT]) outb |= BIT(0);
|
||||
|
||||
Reference in New Issue
Block a user