mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-27 17:24:59 +02:00
Merge pull request #1165 from unknownbrackets/hle-delay
Don't delay results when dispatch is disabled
This commit is contained in:
+15
-5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user