diff options
| author | Adam Bird <Archez@users.noreply.github.com> | 2023-02-26 19:44:30 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-27 01:44:30 +0100 |
| commit | c1ddeec02a6a9d75c70bcc5c8e4723a70b634bde (patch) | |
| tree | 4bed80900e1cf9705953c6ff8fcc33b07b4300e3 | |
| parent | 60b206140d836d72c95b95799a0c3111fb9e5be4 (diff) | |
fix cutscenes loading wrong resource when only an mq rom is loaded (#2545)
| -rw-r--r-- | soh/soh/OTRGlobals.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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<Mercury> Conf) { |
