From c1ddeec02a6a9d75c70bcc5c8e4723a70b634bde Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Sun, 26 Feb 2023 19:44:30 -0500 Subject: [PATCH] fix cutscenes loading wrong resource when only an mq rom is loaded (#2545) --- soh/soh/OTRGlobals.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index ff008884b..968c9499a 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1186,7 +1186,14 @@ extern "C" SkeletonHeader* ResourceMgr_LoadSkeletonByName(const char* path) { } extern "C" s32* ResourceMgr_LoadCSByName(const char* path) { - return (s32*)GetResourceDataByName(path, false); + // Handle mq vs nonmq for cutscenes due to scene/ paths + auto res = ResourceMgr_LoadResource(path); + + if (res == nullptr) { + return nullptr; + } + + return (s32*)res->GetPointer(); } std::filesystem::path GetSaveFile(std::shared_ptr Conf) {