mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Fix a performance issue in CallSyscall
This commit is contained in:
parent
12edfcea5a
commit
38b7d89dfb
@ -70,6 +70,7 @@ static int delayedResultEvent = -1;
|
||||
static int hleAfterSyscall = HLE_AFTER_NOTHING;
|
||||
static const char *hleAfterSyscallReschedReason;
|
||||
static const HLEFunction *latestSyscall = nullptr;
|
||||
static int idleOp;
|
||||
|
||||
void hleDelayResultFinish(u64 userdata, int cycleslate)
|
||||
{
|
||||
@ -93,6 +94,7 @@ void HLEInit()
|
||||
{
|
||||
RegisterAllModules();
|
||||
delayedResultEvent = CoreTiming::RegisterEvent("HLEDelayedResult", hleDelayResultFinish);
|
||||
idleOp = GetSyscallOp("FakeSysCalls", NID_IDLE);
|
||||
}
|
||||
|
||||
void HLEDoState(PointerWrap &p)
|
||||
@ -540,9 +542,8 @@ void CallSyscall(MIPSOpcode op)
|
||||
return;
|
||||
}
|
||||
|
||||
if (info->func)
|
||||
{
|
||||
if (op == GetSyscallOp("FakeSysCalls", NID_IDLE))
|
||||
if (info->func) {
|
||||
if (op == idleOp)
|
||||
info->func();
|
||||
else if (info->flags != 0)
|
||||
CallSyscallWithFlags(info);
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/MIPS/JitCommon/JitCommon.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user