mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Revert "(RMenu) Take out menu_texture_inited bool"
This reverts commit 36820347b3
.
This commit is contained in:
parent
f1b3252193
commit
ea49c5ecae
1
driver.h
1
driver.h
@ -23,7 +23,6 @@
|
||||
#include "libretro_private.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "miscellaneous.h"
|
||||
#include "msvc/msvc_compat.h"
|
||||
#include "gfx/scaler/scaler.h"
|
||||
#include "gfx/image/image.h"
|
||||
|
@ -64,6 +64,7 @@
|
||||
|
||||
struct texture_image *menu_texture;
|
||||
static bool render_normal = true;
|
||||
static bool menu_texture_inited =false;
|
||||
|
||||
static void rmenu_render_background(void)
|
||||
{
|
||||
@ -440,13 +441,14 @@ void rmenu_set_texture(void *data, bool enable)
|
||||
{
|
||||
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||
|
||||
if (menu_texture)
|
||||
if (menu_texture_inited)
|
||||
return;
|
||||
|
||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_texture_enable)
|
||||
{
|
||||
driver.video_poke->set_texture_frame(driver.video_data, menu_texture->pixels,
|
||||
enable, rgui->width, rgui->height, 1.0f);
|
||||
menu_texture_inited = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -459,9 +461,6 @@ static void rmenu_context_reset(void *data)
|
||||
|
||||
menu_texture = (struct texture_image*)calloc(1, sizeof(*menu_texture));
|
||||
|
||||
if (!menu_texture)
|
||||
return;
|
||||
|
||||
texture_image_load(driver.video_data, g_extern.menu_texture_path, menu_texture);
|
||||
rgui->width = menu_texture->width;
|
||||
rgui->height = menu_texture->height;
|
||||
@ -482,6 +481,8 @@ static void *rmenu_init(void)
|
||||
static void rmenu_context_destroy(void *data)
|
||||
{
|
||||
texture_image_free(driver.video_data, menu_texture);
|
||||
|
||||
menu_texture_inited = false;
|
||||
}
|
||||
|
||||
static void rmenu_free(void *data)
|
||||
|
Loading…
Reference in New Issue
Block a user