From d1bcc1d8b539cc60b59bddb98d1fcb161f974c28 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 9 Aug 2022 18:27:33 -0400 Subject: [PATCH] CGraphicsPalette: Use GXDestroyTlutObj --- Runtime/Graphics/CGraphicsPalette.cpp | 6 ++++++ Runtime/Graphics/CGraphicsPalette.hpp | 1 + extern/aurora | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Runtime/Graphics/CGraphicsPalette.cpp b/Runtime/Graphics/CGraphicsPalette.cpp index be0216037..eb59bd9cc 100644 --- a/Runtime/Graphics/CGraphicsPalette.cpp +++ b/Runtime/Graphics/CGraphicsPalette.cpp @@ -19,6 +19,12 @@ CGraphicsPalette::CGraphicsPalette(CInputStream& in) : x0_fmt(EPaletteFormat(in. // DCFlushRange(xc_entries.get(), x8_entryCount * 2); } +CGraphicsPalette::~CGraphicsPalette() { +#ifdef AURORA + GXDestroyTlutObj(&x10_tlutObj); +#endif +} + void CGraphicsPalette::Load() { GXLoadTlut(&x10_tlutObj, GX_TLUT0); x4_frameLoaded = sCurrentFrameCount; diff --git a/Runtime/Graphics/CGraphicsPalette.hpp b/Runtime/Graphics/CGraphicsPalette.hpp index 813946fd9..5ffe01bc4 100644 --- a/Runtime/Graphics/CGraphicsPalette.hpp +++ b/Runtime/Graphics/CGraphicsPalette.hpp @@ -27,6 +27,7 @@ class CGraphicsPalette { public: explicit CGraphicsPalette(EPaletteFormat fmt, int count); explicit CGraphicsPalette(CInputStream& in); + ~CGraphicsPalette(); u16* Lock() { x1c_locked = true; diff --git a/extern/aurora b/extern/aurora index 5f06d873b..8cbebc12b 160000 --- a/extern/aurora +++ b/extern/aurora @@ -1 +1 @@ -Subproject commit 5f06d873bc25d139e5c1fe457a3e4706188c64ee +Subproject commit 8cbebc12b2b2d0598a130aa704855ceb89507068