do not evaluate driver logic when HidDevice has not found at least once (bluedot, snek and stac)
This commit is contained in:
@@ -38,6 +38,9 @@ void LightsDriver_HidBlueDot::SetLight(unsigned char* buffer, int index, bool va
|
||||
|
||||
void LightsDriver_HidBlueDot::Set(const LightsState *ls)
|
||||
{
|
||||
if (!dev.FoundOnce())
|
||||
return;
|
||||
|
||||
//! Set cabinet lights.
|
||||
SetCabinetLight(m_Marquee_UpLeft, ls->m_bCabinetLights[LIGHT_MARQUEE_UP_LEFT]);
|
||||
SetCabinetLight(m_Marquee_UpRight, ls->m_bCabinetLights[LIGHT_MARQUEE_UP_RIGHT]);
|
||||
|
||||
@@ -42,6 +42,9 @@ void LightsDriver_snek::SetBuffer(int index, bool lightState)
|
||||
|
||||
void LightsDriver_snek::Set(const LightsState *ls)
|
||||
{
|
||||
if (!dev.FoundOnce())
|
||||
return;
|
||||
|
||||
SetBuffer(SNEK_INDEX_DANCE_M_UL, ls->m_bCabinetLights[LIGHT_MARQUEE_UP_LEFT]);
|
||||
SetBuffer(SNEK_INDEX_DANCE_M_UR, ls->m_bCabinetLights[LIGHT_MARQUEE_UP_RIGHT]);
|
||||
SetBuffer(SNEK_INDEX_DANCE_M_LL, ls->m_bCabinetLights[LIGHT_MARQUEE_LR_LEFT]);
|
||||
|
||||
@@ -42,7 +42,7 @@ void LightsDriver_stac::SetBuffer(int index, bool lightState, GameController ctr
|
||||
void LightsDriver_stac::HandleState(const LightsState *ls, GameController ctrlNum)
|
||||
{
|
||||
// do not create a message for an disconnected device.
|
||||
if (!devs[ctrlNum].IsConnected())
|
||||
if (!devs[ctrlNum].FoundOnce())
|
||||
return;
|
||||
|
||||
// check to see which game we are running as it can change during gameplay.
|
||||
|
||||
Reference in New Issue
Block a user