diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index fdb2ed7c7..6412c8d0b 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -261,6 +261,10 @@ const char* constCameraStrings[] = { }; OTRGlobals::OTRGlobals() { + context = Ship::Context::CreateUninitializedInstance("Ship of Harkinian", appShortName, "shipofharkinian.json"); +} + +void OTRGlobals::Initialize() { std::vector OTRFiles; std::string mqPath = Ship::Context::LocateFileAcrossAppDirs("oot-mq.otr", appShortName); if (std::filesystem::exists(mqPath)) { @@ -300,8 +304,6 @@ OTRGlobals::OTRGlobals() { OOT_NTSC_JP_GC, OOT_NTSC_US_GC, OOT_PAL_GC, OOT_PAL_GC_DBG1, OOT_PAL_GC_DBG2, }; - context = Ship::Context::CreateUninitializedInstance("Ship of Harkinian", appShortName, "shipofharkinian.json"); - context->InitLogging(); context->InitGfxDebugger(); context->InitConfiguration(); @@ -1100,7 +1102,7 @@ void CheckAndCreateModFolder() { } extern "C" void InitOTR() { - + OTRGlobals::Instance = new OTRGlobals(); #ifdef __SWITCH__ Ship::Switch::Init(Ship::PreInitPhase); #elif defined(__WIIU__) @@ -1207,7 +1209,7 @@ extern "C" void InitOTR() { DetectOTRVersion("oot.otr", false); DetectOTRVersion("oot-mq.otr", true); - OTRGlobals::Instance = new OTRGlobals(); + OTRGlobals::Instance->Initialize(); CustomMessageManager::Instance = new CustomMessageManager(); ItemTableManager::Instance = new ItemTableManager(); GameInteractor::Instance = new GameInteractor(); diff --git a/soh/soh/OTRGlobals.h b/soh/soh/OTRGlobals.h index 3e6f1a34d..9e7815523 100644 --- a/soh/soh/OTRGlobals.h +++ b/soh/soh/OTRGlobals.h @@ -71,7 +71,7 @@ class OTRGlobals { ~OTRGlobals(); void ScaleImGui(); - + void Initialize(); bool HasMasterQuest(); bool HasOriginal(); uint32_t GetInterpolationFPS();