mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Revert "(RMenu) Take out menu_texture_inited bool"
This reverts commit 36820347b3de8fd28f1c9288d8a521ca123bb0f4.
This commit is contained in:
parent
f1b3252193
commit
ea49c5ecae
1
driver.h
1
driver.h
@ -23,7 +23,6 @@
|
|||||||
#include "libretro_private.h"
|
#include "libretro_private.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "miscellaneous.h"
|
|
||||||
#include "msvc/msvc_compat.h"
|
#include "msvc/msvc_compat.h"
|
||||||
#include "gfx/scaler/scaler.h"
|
#include "gfx/scaler/scaler.h"
|
||||||
#include "gfx/image/image.h"
|
#include "gfx/image/image.h"
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
|
|
||||||
struct texture_image *menu_texture;
|
struct texture_image *menu_texture;
|
||||||
static bool render_normal = true;
|
static bool render_normal = true;
|
||||||
|
static bool menu_texture_inited =false;
|
||||||
|
|
||||||
static void rmenu_render_background(void)
|
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;
|
rgui_handle_t *rgui = (rgui_handle_t*)data;
|
||||||
|
|
||||||
if (menu_texture)
|
if (menu_texture_inited)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (driver.video_data && driver.video_poke && driver.video_poke->set_texture_enable)
|
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,
|
driver.video_poke->set_texture_frame(driver.video_data, menu_texture->pixels,
|
||||||
enable, rgui->width, rgui->height, 1.0f);
|
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));
|
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);
|
texture_image_load(driver.video_data, g_extern.menu_texture_path, menu_texture);
|
||||||
rgui->width = menu_texture->width;
|
rgui->width = menu_texture->width;
|
||||||
rgui->height = menu_texture->height;
|
rgui->height = menu_texture->height;
|
||||||
@ -482,6 +481,8 @@ static void *rmenu_init(void)
|
|||||||
static void rmenu_context_destroy(void *data)
|
static void rmenu_context_destroy(void *data)
|
||||||
{
|
{
|
||||||
texture_image_free(driver.video_data, menu_texture);
|
texture_image_free(driver.video_data, menu_texture);
|
||||||
|
|
||||||
|
menu_texture_inited = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rmenu_free(void *data)
|
static void rmenu_free(void *data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user