mirror of
https://github.com/libretro/Play-.git
synced 2025-03-03 16:57:03 +00:00
Move interrupt checking code in a separate function.
This commit is contained in:
parent
184a25c09c
commit
00fc68d96e
@ -241,6 +241,17 @@ uint32 CSubSystem::WriteIoRegister(uint32 address, uint32 value)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CSubSystem::CheckPendingInterrupts()
|
||||
{
|
||||
if(!m_cpu.m_State.nHasException)
|
||||
{
|
||||
if(m_intc.HasPendingInterrupt())
|
||||
{
|
||||
m_bios->HandleInterrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CSubSystem::IsCpuIdle()
|
||||
{
|
||||
if(m_bios->IsIdle())
|
||||
@ -290,13 +301,7 @@ void CSubSystem::CountTicks(int ticks)
|
||||
int CSubSystem::ExecuteCpu(int quota)
|
||||
{
|
||||
int executed = 0;
|
||||
if(!m_cpu.m_State.nHasException)
|
||||
{
|
||||
if(m_intc.HasPendingInterrupt())
|
||||
{
|
||||
m_bios->HandleInterrupt();
|
||||
}
|
||||
}
|
||||
CheckPendingInterrupts();
|
||||
if(!m_cpu.m_State.nHasException)
|
||||
{
|
||||
executed = (quota - m_executor.Execute(quota));
|
||||
|
@ -65,6 +65,8 @@ namespace Iop
|
||||
uint32 ReadIoRegister(uint32);
|
||||
uint32 WriteIoRegister(uint32, uint32);
|
||||
|
||||
void CheckPendingInterrupts();
|
||||
|
||||
int m_dmaUpdateTicks;
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user