mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Don't delay results when dispatch is disabled.
Wait won't work so the CoreTiming event will just cause havoc.
This commit is contained in:
parent
22a8d9c3ce
commit
ba264b1df3
@ -332,16 +332,26 @@ bool hleExecuteDebugBreak(const HLEFunction &func)
|
||||
|
||||
u32 hleDelayResult(u32 result, const char *reason, int usec)
|
||||
{
|
||||
CoreTiming::ScheduleEvent(usToCycles(usec), delayedResultEvent, __KernelGetCurThread());
|
||||
__KernelWaitCurThread(WAITTYPE_DELAY, 1, result, 0, false, reason);
|
||||
if (__KernelIsDispatchEnabled())
|
||||
{
|
||||
CoreTiming::ScheduleEvent(usToCycles(usec), delayedResultEvent, __KernelGetCurThread());
|
||||
__KernelWaitCurThread(WAITTYPE_DELAY, 1, result, 0, false, reason);
|
||||
}
|
||||
else
|
||||
WARN_LOG(HLE, "Dispatch disabled, not delaying HLE result (right thing to do?)");
|
||||
return result;
|
||||
}
|
||||
|
||||
u64 hleDelayResult(u64 result, const char *reason, int usec)
|
||||
{
|
||||
u64 param = (result & 0xFFFFFFFF00000000) | __KernelGetCurThread();
|
||||
CoreTiming::ScheduleEvent(usToCycles(usec), delayedResultEvent, param);
|
||||
__KernelWaitCurThread(WAITTYPE_DELAY, 1, (u32) result, 0, false, reason);
|
||||
if (__KernelIsDispatchEnabled())
|
||||
{
|
||||
u64 param = (result & 0xFFFFFFFF00000000) | __KernelGetCurThread();
|
||||
CoreTiming::ScheduleEvent(usToCycles(usec), delayedResultEvent, param);
|
||||
__KernelWaitCurThread(WAITTYPE_DELAY, 1, (u32) result, 0, false, reason);
|
||||
}
|
||||
else
|
||||
WARN_LOG(HLE, "Dispatch disabled, not delaying HLE result (right thing to do?)");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user