From 698a461fddb0975a9d535b021db8372b3a6876b3 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 9 Mar 2025 07:30:16 +1100 Subject: [PATCH] Wii U: Don't forget to reset pointer to NULL --- src/Graphics_PSVita.c | 2 -- src/Graphics_WiiU.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Graphics_PSVita.c b/src/Graphics_PSVita.c index c71d5c537..95b22ac56 100644 --- a/src/Graphics_PSVita.c +++ b/src/Graphics_PSVita.c @@ -293,8 +293,6 @@ static void CreateFragmentPrograms(int index, const SceGxmProgram* fragProgram, { FragmentProgram* FP = &FP_list[index + i]; sceGxmShaderPatcherRegisterProgram(gxm_shader_patcher, fragProgram, &programID); - - const SceGxmProgram* prog = sceGxmShaderPatcherGetProgramFromId(programID); // TODO just use original program directly? sceGxmShaderPatcherCreateFragmentProgram(gxm_shader_patcher, programID, SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4, diff --git a/src/Graphics_WiiU.c b/src/Graphics_WiiU.c index 7169bc226..ed8ba6669 100644 --- a/src/Graphics_WiiU.c +++ b/src/Graphics_WiiU.c @@ -184,8 +184,10 @@ static void BindPendingTexture(void) { } void Gfx_DeleteTexture(GfxResourceID* texId) { - if (*texId == pendingTex) pendingTex = NULL; + GX2Texture* tex = (GX2Texture*)texId; + if (tex == pendingTex) pendingTex = NULL; // TODO free memory ??? + *texId = NULL; } void Gfx_EnableMipmaps(void) { } // TODO