mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(XDK) Remove texture_image_free - will have to manually do freeing
memory management without a public function for Xbox
This commit is contained in:
parent
de31ccef3e
commit
a871b6da54
@ -232,9 +232,27 @@ static void rmenu_gfx_free(void)
|
||||
{
|
||||
#ifdef _XBOX1
|
||||
#ifdef HAVE_MENU_PANEL
|
||||
texture_image_free(menu_panel);
|
||||
if (menu_panel->vertex_buf)
|
||||
{
|
||||
menu_panel->vertex_buf->Release();
|
||||
menu_panel->vertex_buf = NULL;
|
||||
}
|
||||
if (menu_panel->pixels)
|
||||
{
|
||||
menu_panel->pixels->Release();
|
||||
menu_panel->pixels = NULL;
|
||||
}
|
||||
#endif
|
||||
texture_image_free(menu_texture);
|
||||
if (menu_texture->vertex_buf)
|
||||
{
|
||||
menu_texture->vertex_buf->Release();
|
||||
menu_texture->vertex_buf = NULL;
|
||||
}
|
||||
if (menu_texture->pixels)
|
||||
{
|
||||
menu_texture->pixels->Release();
|
||||
menu_texture->pixels = NULL;
|
||||
}
|
||||
#else
|
||||
#ifdef HAVE_MENU_PANEL
|
||||
if (menu_panel)
|
||||
@ -1052,7 +1070,16 @@ static int select_file(uint8_t menu_type, uint64_t input)
|
||||
if (menu_texture)
|
||||
{
|
||||
#ifdef _XBOX
|
||||
texture_image_free(menu_texture);
|
||||
if (menu_texture->vertex_buf)
|
||||
{
|
||||
menu_texture->vertex_buf->Release();
|
||||
menu_texture->vertex_buf = NULL;
|
||||
}
|
||||
if (menu_texture->pixels)
|
||||
{
|
||||
menu_texture->pixels->Release();
|
||||
menu_texture->pixels = NULL;
|
||||
}
|
||||
#else
|
||||
free(menu_texture->pixels);
|
||||
menu_texture->pixels = NULL;
|
||||
|
@ -39,7 +39,6 @@ struct texture_image
|
||||
};
|
||||
|
||||
#ifdef _XBOX1
|
||||
void texture_image_free(struct texture_image *out_img);
|
||||
bool texture_image_render(struct texture_image *out_img);
|
||||
#endif
|
||||
|
||||
|
17
xdk/image.c
17
xdk/image.c
@ -54,23 +54,6 @@ bool texture_image_load(const char *path, struct texture_image *out_img)
|
||||
return true;
|
||||
}
|
||||
|
||||
void texture_image_free(struct texture_image *out_img)
|
||||
{
|
||||
// free the vertex buffer
|
||||
if (out_img->vertex_buf)
|
||||
{
|
||||
out_img->vertex_buf->Release();
|
||||
out_img->vertex_buf = NULL;
|
||||
}
|
||||
|
||||
// free the texture
|
||||
if (out_img->pixels)
|
||||
{
|
||||
out_img->pixels->Release();
|
||||
out_img->pixels = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool texture_image_render(struct texture_image *out_img)
|
||||
{
|
||||
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user