Add invalidate texture when it changes

This commit is contained in:
Francisco Javier Trujillo Mata 2022-07-12 23:01:28 +02:00 committed by Sam Lantinga
parent 5bb965be3d
commit f75c35c071

View file

@ -166,10 +166,11 @@ static int
PS2_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels, int pitch)
{
/* PSP_TextureData *psp_texture = (PSP_TextureData *) texture->driverdata; */
const Uint8 *src;
Uint8 *dst;
int row, length,dpitch;
GSTEXTURE *ps2_texture = (GSTEXTURE *) texture->driverdata;
PS2_RenderData *data = (PS2_RenderData *) renderer->driverdata;
src = pixels;
PS2_LockTexture(renderer, texture, rect, (void **)&dst, &dpitch);
@ -184,6 +185,8 @@ PS2_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
}
}
gsKit_TexManager_invalidate(data->gsGlobal, ps2_texture);
return 0;
}