aica: always avoid race condition when sh4 interrupt is raised

... even if an SH4 interrupt is already asserted.
Regression introduced by c7d214e55a
Fixes audio freeze in Test Drive Le Mans
Issue #1267
This commit is contained in:
Flyinghead 2023-10-30 17:47:19 +01:00
parent 24944e00a7
commit 51089c5e0a
1 changed files with 2 additions and 4 deletions

View File

@ -76,19 +76,17 @@ static bool UpdateSh4Ints()
if (p_ints) if (p_ints)
{ {
if ((SB_ISTEXT & SH4_IRQ_BIT) == 0) if ((SB_ISTEXT & SH4_IRQ_BIT) == 0)
{
// if no interrupt is already pending then raise one // if no interrupt is already pending then raise one
asic_RaiseInterrupt(holly_SPU_IRQ); asic_RaiseInterrupt(holly_SPU_IRQ);
return true; return true;
} }
}
else else
{ {
if ((SB_ISTEXT & SH4_IRQ_BIT) != 0) if ((SB_ISTEXT & SH4_IRQ_BIT) != 0)
asic_CancelInterrupt(holly_SPU_IRQ); asic_CancelInterrupt(holly_SPU_IRQ);
}
return false; return false;
} }
}
AicaTimer timers[3]; AicaTimer timers[3];
int aica_schid = -1; int aica_schid = -1;