PSP: use SDL_malloc/SDL_free

This commit is contained in:
Sylvain 2021-11-22 16:16:04 +01:00 committed by Sam Lantinga
parent f1582f549b
commit fb218e582a
1 changed files with 4 additions and 4 deletions

View File

@ -221,7 +221,7 @@ TextureSwizzle(PSP_TextureData *psp_texture)
unsigned int *src = (unsigned int*) psp_texture->data; unsigned int *src = (unsigned int*) psp_texture->data;
unsigned char *data = NULL; unsigned char *data = NULL;
data = malloc(psp_texture->size); data = SDL_malloc(psp_texture->size);
int j; int j;
@ -246,7 +246,7 @@ TextureSwizzle(PSP_TextureData *psp_texture)
blockaddress += rowblocksadd; blockaddress += rowblocksadd;
} }
free(psp_texture->data); SDL_free(psp_texture->data);
psp_texture->data = data; psp_texture->data = data;
psp_texture->swizzled = SDL_TRUE; psp_texture->swizzled = SDL_TRUE;
@ -272,7 +272,7 @@ int TextureUnswizzle(PSP_TextureData *psp_texture)
unsigned char *data = NULL; unsigned char *data = NULL;
data = malloc(psp_texture->size); data = SDL_malloc(psp_texture->size);
if(!data) if(!data)
return 0; return 0;
@ -308,7 +308,7 @@ int TextureUnswizzle(PSP_TextureData *psp_texture)
ydst += dstrow; ydst += dstrow;
} }
free(psp_texture->data); SDL_free(psp_texture->data);
psp_texture->data = data; psp_texture->data = data;