mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 16:24:53 +02:00
__KernelModuleDoState: Only apply function replacement on state load. Improves performance of rewind states
This commit is contained in:
@@ -434,18 +434,18 @@ static std::set<SceUID> loadedModules;
|
||||
// STATE END
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void __KernelModuleInit()
|
||||
{
|
||||
static void __KernelModuleInit() {
|
||||
actionAfterModule = __KernelRegisterActionType(AfterModuleEntryCall::Create);
|
||||
}
|
||||
|
||||
void __KernelModuleDoState(PointerWrap &p)
|
||||
{
|
||||
void __KernelModuleDoState(PointerWrap &p) {
|
||||
auto s = p.Section("sceKernelModule", 1, 2);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
Do(p, actionAfterModule);
|
||||
|
||||
// TODO: Only needed during read, right?
|
||||
__KernelRestoreActionType(actionAfterModule, AfterModuleEntryCall::Create);
|
||||
|
||||
if (s >= 2) {
|
||||
@@ -463,15 +463,13 @@ void __KernelModuleDoState(PointerWrap &p)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_Config.bFuncReplacements) {
|
||||
MIPSAnalyst::ReplaceFunctions();
|
||||
if (g_Config.bFuncReplacements) {
|
||||
MIPSAnalyst::ReplaceFunctions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void __KernelModuleShutdown()
|
||||
{
|
||||
void __KernelModuleShutdown() {
|
||||
loadedModules.clear();
|
||||
MIPSAnalyst::Reset();
|
||||
HLEPlugins::Unload();
|
||||
|
||||
Reference in New Issue
Block a user