Mockingboard: do not play sound unless a card is present.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2023-05-02 09:31:04 +01:00
parent 96a386a77a
commit 10b4406aea

View File

@ -220,13 +220,17 @@ void MockingboardCardManager::Update(const ULONG executedCycles)
// NB. CardManager has just called each card's Update()
bool active = false;
bool present = false;
for (UINT i = SLOT0; i < NUM_SLOTS; i++)
{
if (IsMockingboard(i))
{
active |= dynamic_cast<MockingboardCard&>(GetCardMgr().GetRef(i)).IsAnyTimer1Active();
present = true;
}
}
if (active)
if (!present || active)
return;
// No 6522 TIMER1's are active, so periodically update AY8913's here...