Skip to content

Commit 741cedb

Browse files
committed
Move textures to VRAM
1 parent b31b288 commit 741cedb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/render/psp/SDL_render_psp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,10 @@ static int PSP_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture)
316316
psp_tex->textureWidth = calculateNextPow2(texture->w);
317317
psp_tex->textureHeight = calculateNextPow2(texture->h);
318318
psp_tex->size = getMemorySize(psp_tex->width, psp_tex->height, psp_tex->format);
319-
psp_tex->data = SDL_calloc(1, psp_tex->size);
319+
psp_tex->data = vramalloc(psp_tex->size);
320320

321321
if (!psp_tex->data) {
322-
SDL_free(psp_tex);
322+
vfree(psp_tex);
323323
return SDL_OutOfMemory();
324324
}
325325

@@ -869,7 +869,7 @@ static void PSP_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture)
869869
return;
870870
}
871871

872-
SDL_free(psp_texture->data);
872+
vfree(psp_texture->data);
873873
SDL_free(psp_texture);
874874
texture->driverdata = NULL;
875875
}

0 commit comments

Comments
 (0)