mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-05-28 17:41:37 +00:00
Mockingboard: do not play sound unless a card is present. (PR #1222)
This commit is contained in:
parent
0ecd2e865a
commit
a648c3e607
|
@ -220,13 +220,17 @@ void MockingboardCardManager::Update(const ULONG executedCycles)
|
||||||
// NB. CardManager has just called each card's Update()
|
// NB. CardManager has just called each card's Update()
|
||||||
|
|
||||||
bool active = false;
|
bool active = false;
|
||||||
|
bool present = false;
|
||||||
for (UINT i = SLOT0; i < NUM_SLOTS; i++)
|
for (UINT i = SLOT0; i < NUM_SLOTS; i++)
|
||||||
{
|
{
|
||||||
if (IsMockingboard(i))
|
if (IsMockingboard(i))
|
||||||
|
{
|
||||||
active |= dynamic_cast<MockingboardCard&>(GetCardMgr().GetRef(i)).IsAnyTimer1Active();
|
active |= dynamic_cast<MockingboardCard&>(GetCardMgr().GetRef(i)).IsAnyTimer1Active();
|
||||||
|
present = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (active)
|
if (!present || active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// No 6522 TIMER1's are active, so periodically update AY8913's here...
|
// No 6522 TIMER1's are active, so periodically update AY8913's here...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user