mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 00:03:37 +01:00
Fix alarm test by not interrupting when disabled.
vblank was interrupting/rescheduling when interrupts were disabled. That's bad.
This commit is contained in:
1 parent
c7204797e7
commit
2fa0cf040d
3 files changed
+10
-4
No files matched your search
@@ -182,10 +182,8 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
|
||||
}
|
||||
vblankWaitingThreads.clear();
|
||||
|
||||
// We want to "interrupt" even if there are no installed vblank handlers.
|
||||
__KernelSwitchOffThread("vblank");
|
||||
// Trigger VBlank interrupt handlers.
|
||||
__TriggerInterrupt(PSP_INTR_IMMEDIATE | PSP_INTR_ONLY_IF_ENABLED, PSP_VBLANK_INTR);
|
||||
// Trigger VBlank interrupt handlers - and resched even if there's none registered.
|
||||
__TriggerInterrupt(PSP_INTR_IMMEDIATE | PSP_INTR_ONLY_IF_ENABLED | PSP_INTR_ALWAYS_RESCHED, PSP_VBLANK_INTR);
|
||||
|
||||
CoreTiming::ScheduleEvent(msToCycles(vblankMs) - cyclesLate, leaveVblankEvent, vbCount+1);
|
||||
|
||||
|
||||
@@ -386,6 +386,11 @@ void __TriggerRunInterrupts(int type)
|
||||
{
|
||||
if ((type & PSP_INTR_HLE) != 0)
|
||||
hleRunInterrupts();
|
||||
else if ((type & PSP_INTR_ALWAYS_RESCHED) != 0)
|
||||
{
|
||||
if (!__RunOnePendingInterrupt())
|
||||
__KernelSwitchOffThread("interrupt");
|
||||
}
|
||||
else
|
||||
__RunOnePendingInterrupt();
|
||||
}
|
||||
|
||||
@@ -63,6 +63,9 @@ enum PSPInterruptTriggerType {
|
||||
PSP_INTR_HLE = 0x1,
|
||||
// Only trigger (as above) if interrupts are not suspended.
|
||||
PSP_INTR_ONLY_IF_ENABLED = 0x2,
|
||||
// Always reschedule, even if there's no handler registered.
|
||||
// TODO: Maybe this should just always do this? Not sure.
|
||||
PSP_INTR_ALWAYS_RESCHED = 0x4,
|
||||
};
|
||||
|
||||
struct PendingInterrupt {
|
||||
|
||||
Reference in new issue
Block a user