Invalidate texture in the UnlockTextureMethod
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/src/render/ps2/SDL_render_ps2.c b/src/render/ps2/SDL_render_ps2.c
index d8cec5d..b514333 100644
--- a/src/render/ps2/SDL_render_ps2.c
+++ b/src/render/ps2/SDL_render_ps2.c
@@ -158,6 +158,15 @@ PS2_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
return 0;
}
+static void
+PS2_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
+{
+ GSTEXTURE *ps2_texture = (GSTEXTURE *) texture->driverdata;
+ PS2_RenderData *data = (PS2_RenderData *) renderer->driverdata;
+
+ gsKit_TexManager_invalidate(data->gsGlobal, ps2_texture);
+}
+
static int
PS2_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels, int pitch)
@@ -181,17 +190,12 @@ PS2_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
}
}
- gsKit_TexManager_invalidate(data->gsGlobal, ps2_texture);
+ PS2_UnlockTexture(renderer, texture);
return 0;
}
static void
-PS2_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * texture)
-{
-}
-
-static void
PS2_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture, SDL_ScaleMode scaleMode)
{
}