mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix a performance issue in CallSyscall
This commit is contained in:
parent
12edfcea5a
commit
38b7d89dfb
2 changed files with 6 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue