do not evaluate driver logic when HidDevice has not found at least once (bluedot, snek and stac)

This commit is contained in:
DANDO\Aless
2025-03-22 17:29:54 +01:00
committed by teejusb
parent db3543b507
commit 63a68ae38a
3 changed files with 7 additions and 1 deletions
@@ -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]);
+3
View File
@@ -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]);
+1 -1
View File
@@ -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.