HLE: Add Reload() function
This commit is contained in:
parent
20a9c5b12d
commit
5a1ebe232e
|
@ -785,8 +785,7 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id, u64 title_id, u
|
||||||
// TODO: have a callback mechanism for title changes?
|
// TODO: have a callback mechanism for title changes?
|
||||||
g_symbolDB.Clear();
|
g_symbolDB.Clear();
|
||||||
CBoot::LoadMapFromFilename();
|
CBoot::LoadMapFromFilename();
|
||||||
HLE::Clear();
|
HLE::Reload();
|
||||||
HLE::PatchFunctions();
|
|
||||||
PatchEngine::Reload();
|
PatchEngine::Reload();
|
||||||
HiresTexture::Update();
|
HiresTexture::Update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,6 +160,13 @@ void Clear()
|
||||||
s_original_instructions.clear();
|
s_original_instructions.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Reload()
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
PatchFixedFunctions();
|
||||||
|
PatchFunctions();
|
||||||
|
}
|
||||||
|
|
||||||
void Execute(u32 _CurrentPC, u32 _Instruction)
|
void Execute(u32 _CurrentPC, u32 _Instruction)
|
||||||
{
|
{
|
||||||
unsigned int FunctionIndex = _Instruction & 0xFFFFF;
|
unsigned int FunctionIndex = _Instruction & 0xFFFFF;
|
||||||
|
|
|
@ -27,6 +27,7 @@ enum HookFlag
|
||||||
void PatchFixedFunctions();
|
void PatchFixedFunctions();
|
||||||
void PatchFunctions();
|
void PatchFunctions();
|
||||||
void Clear();
|
void Clear();
|
||||||
|
void Reload();
|
||||||
|
|
||||||
void Patch(u32 pc, const char* func_name);
|
void Patch(u32 pc, const char* func_name);
|
||||||
u32 UnPatch(const std::string& patchName);
|
u32 UnPatch(const std::string& patchName);
|
||||||
|
|
Loading…
Reference in New Issue