mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-08 12:50:07 +00:00
Make state static and move it to menu_display.c
This commit is contained in:
parent
6482969459
commit
f6a7256f20
@ -650,7 +650,7 @@ static void *rgui_init(void)
|
||||
if (!rgui)
|
||||
goto error;
|
||||
|
||||
frame_buf = &menu->display.frame_buf;
|
||||
frame_buf = menu_display_fb_get_ptr();
|
||||
|
||||
/* 4 extra lines to cache the checked background */
|
||||
frame_buf->data = (uint16_t*)calloc(400 * (240 + 4), sizeof(uint16_t));
|
||||
|
@ -1821,7 +1821,7 @@ static void *xmb_init(void)
|
||||
if (!menu)
|
||||
goto error;
|
||||
|
||||
frame_buf = &menu->display.frame_buf;
|
||||
frame_buf = menu_display_fb_get_ptr();
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "../gfx/video_context_driver.h"
|
||||
#include "../gfx/video_thread_wrapper.h"
|
||||
|
||||
static menu_framebuf_t frame_buf_state;
|
||||
|
||||
menu_display_t *menu_display_get_ptr(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
@ -32,10 +34,7 @@ menu_display_t *menu_display_get_ptr(void)
|
||||
|
||||
menu_framebuf_t *menu_display_fb_get_ptr(void)
|
||||
{
|
||||
menu_display_t *disp = menu_display_get_ptr();
|
||||
if (!disp)
|
||||
return NULL;
|
||||
return &disp->frame_buf;
|
||||
return &frame_buf_state;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,7 +91,8 @@ void menu_display_free(void *data)
|
||||
menu_animation_free(disp->animation);
|
||||
disp->animation = NULL;
|
||||
|
||||
menu_display_fb_free(&disp->frame_buf);
|
||||
menu_display_fb_free(&frame_buf_state);
|
||||
memset(&frame_buf_state, 0, sizeof(menu_framebuf_t));
|
||||
}
|
||||
|
||||
bool menu_display_init(void *data)
|
||||
|
@ -60,7 +60,6 @@ typedef struct menu_display
|
||||
{
|
||||
bool msg_force;
|
||||
|
||||
menu_framebuf_t frame_buf;
|
||||
menu_animation_t *animation;
|
||||
|
||||
struct
|
||||
|
Loading…
x
Reference in New Issue
Block a user