match OverlayManager::LoadIfNotLoaded (thanks to Maide)

This commit is contained in:
Yanis002
2025-02-08 23:07:14 +01:00
parent 25fef6bba1
commit 222f3f7daa
+3 -2
View File
@@ -36,9 +36,10 @@ THUMB void OverlayManager::Load(OverlayIndex index, OverlayId id) {
this->mLoadedOverlays[index] = id;
}
// non-matching (regalloc)
THUMB void OverlayManager::LoadIfNotLoaded(OverlayIndex index, OverlayId id) {
if (this->mLoadedOverlays[index] != id) {
OverlayId loadedId = this->mLoadedOverlays[index];
if (loadedId != id) {
this->Unload(index);
this->Load(index, id);
}