summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2013-09-12 00:03:37 -0400
committercomex <comexk@gmail.com>2013-09-13 15:31:51 -0400
commite6cd3b328376bb3ec71e4f4571991e5d4dec1397 (patch)
tree85e58bee820ffd89dbbb13703fd4b8300b174ee5 /Source
parenta316e2f1827d159e3fbf501f1a10c37bf478700c (diff)
Fix placement of HLE::Patch to not get overwritten by HLE::PatchFunctions.
(This applies to the existing HBReload hook, which would be erased in various circumstances depending on the type of file loaded.)
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/Src/Boot/Boot.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp
index 9f48b87a32..f35c24c594 100644
--- a/Source/Core/Core/Src/Boot/Boot.cpp
+++ b/Source/Core/Core/Src/Boot/Boot.cpp
@@ -184,18 +184,6 @@ bool CBoot::BootUp()
NOTICE_LOG(BOOT, "Booting %s", _StartupPara.m_strFilename.c_str());
- // HLE jump to loader (homebrew). Disabled when Gecko is active as it interferes with the code handler
- if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats)
- {
- HLE::Patch(0x80001800, "HBReload");
- const u8 stubstr[] = { 'S', 'T', 'U', 'B', 'H', 'A', 'X', 'X' };
- Memory::WriteBigEData(stubstr, 0x80001804, 8);
- }
-
- // Not part of the binary itself, but either we or Gecko OS might insert
- // this, and it doesn't clear the icache properly.
- HLE::Patch(0x800018a8, "GeckoCodehandler");
-
g_symbolDB.Clear();
VideoInterface::Preset(_StartupPara.bNTSC);
switch (_StartupPara.m_BootType)
@@ -419,6 +407,19 @@ bool CBoot::BootUp()
return false;
}
}
+
+ // HLE jump to loader (homebrew). Disabled when Gecko is active as it interferes with the code handler
+ if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats)
+ {
+ HLE::Patch(0x80001800, "HBReload");
+ const u8 stubstr[] = { 'S', 'T', 'U', 'B', 'H', 'A', 'X', 'X' };
+ Memory::WriteBigEData(stubstr, 0x80001804, 8);
+ }
+
+ // Not part of the binary itself, but either we or Gecko OS might insert
+ // this, and it doesn't clear the icache properly.
+ HLE::Patch(0x800018a8, "GeckoCodehandler");
+
Host_UpdateLogDisplay();
return true;
}