Fix a performance issue in CallSyscall

This commit is contained in:
Henrik Rydgard 2016-05-07 21:34:27 +02:00
parent 12edfcea5a
commit 38b7d89dfb
2 changed files with 6 additions and 3 deletions

View File

@ -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);

View File

@ -33,6 +33,8 @@
#pragma once
#include <map>
#include "Common/CommonTypes.h"
#include "Core/MIPS/JitCommon/JitCommon.h"