Wii U: Don't forget to reset pointer to NULL

This commit is contained in:
UnknownShadow200 2025-03-09 07:30:16 +11:00
parent 199be2f489
commit 698a461fdd
2 changed files with 3 additions and 3 deletions

View File

@ -293,8 +293,6 @@ static void CreateFragmentPrograms(int index, const SceGxmProgram* fragProgram,
{ {
FragmentProgram* FP = &FP_list[index + i]; FragmentProgram* FP = &FP_list[index + i];
sceGxmShaderPatcherRegisterProgram(gxm_shader_patcher, fragProgram, &programID); sceGxmShaderPatcherRegisterProgram(gxm_shader_patcher, fragProgram, &programID);
const SceGxmProgram* prog = sceGxmShaderPatcherGetProgramFromId(programID); // TODO just use original program directly?
sceGxmShaderPatcherCreateFragmentProgram(gxm_shader_patcher, sceGxmShaderPatcherCreateFragmentProgram(gxm_shader_patcher,
programID, SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4, programID, SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4,

View File

@ -184,8 +184,10 @@ static void BindPendingTexture(void) {
} }
void Gfx_DeleteTexture(GfxResourceID* texId) { void Gfx_DeleteTexture(GfxResourceID* texId) {
if (*texId == pendingTex) pendingTex = NULL; GX2Texture* tex = (GX2Texture*)texId;
if (tex == pendingTex) pendingTex = NULL;
// TODO free memory ??? // TODO free memory ???
*texId = NULL;
} }
void Gfx_EnableMipmaps(void) { } // TODO void Gfx_EnableMipmaps(void) { } // TODO