Create menu_driver_frame
This commit is contained in:
parent
6247e9900b
commit
bf511b72e6
|
@ -145,7 +145,7 @@ static bool caca_gfx_frame(void *data, const void *frame,
|
||||||
caca_clear_canvas(caca_cv);
|
caca_clear_canvas(caca_cv);
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
menu_driver_frame(video_info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (msg)
|
if (msg)
|
||||||
|
|
|
@ -750,7 +750,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||||
}
|
}
|
||||||
|
|
||||||
ctr->msg_rendering_enabled = true;
|
ctr->msg_rendering_enabled = true;
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
menu_driver_frame(video_info);
|
||||||
ctr->msg_rendering_enabled = false;
|
ctr->msg_rendering_enabled = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1449,7 +1449,7 @@ static bool d3d_frame(void *data, const void *frame,
|
||||||
if (d3d->menu && d3d->menu->enabled)
|
if (d3d->menu && d3d->menu->enabled)
|
||||||
{
|
{
|
||||||
d3d_overlay_render(d3d, d3d->menu);
|
d3d_overlay_render(d3d, d3d->menu);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
menu_driver_frame(video_info);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ static bool gdi_gfx_frame(void *data, const void *frame,
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
menu_driver_frame(video_info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gdi_video_width != frame_width || gdi_video_height != frame_height || gdi_video_pitch != pitch)
|
if (gdi_video_width != frame_width || gdi_video_height != frame_height || gdi_video_pitch != pitch)
|
||||||
|
|
|
@ -1279,7 +1279,7 @@ static bool gl_frame(void *data, const void *frame,
|
||||||
#if defined(HAVE_MENU)
|
#if defined(HAVE_MENU)
|
||||||
if (gl->menu_texture_enable)
|
if (gl->menu_texture_enable)
|
||||||
{
|
{
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
menu_driver_frame(video_info);
|
||||||
|
|
||||||
if (gl->menu_texture_enable)
|
if (gl->menu_texture_enable)
|
||||||
gl_draw_texture(gl);
|
gl_draw_texture(gl);
|
||||||
|
|
|
@ -522,7 +522,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width,
|
||||||
SDL_RenderCopyEx(vid->renderer, vid->frame.tex, NULL, NULL, vid->rotation, NULL, SDL_FLIP_NONE);
|
SDL_RenderCopyEx(vid->renderer, vid->frame.tex, NULL, NULL, vid->rotation, NULL, SDL_FLIP_NONE);
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
menu_driver_frame(video_info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (vid->menu.active)
|
if (vid->menu.active)
|
||||||
|
|
|
@ -217,7 +217,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
|
||||||
|
|
||||||
if (vita->menu.active)
|
if (vita->menu.active)
|
||||||
{
|
{
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
menu_driver_frame(video_info);
|
||||||
|
|
||||||
if(vita->menu.texture){
|
if(vita->menu.texture){
|
||||||
if (vita->fullscreen)
|
if (vita->fullscreen)
|
||||||
|
|
|
@ -1738,7 +1738,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||||
#if defined(HAVE_MENU)
|
#if defined(HAVE_MENU)
|
||||||
if (vk->menu.enable)
|
if (vk->menu.enable)
|
||||||
{
|
{
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL);
|
menu_driver_frame(video_info);
|
||||||
|
|
||||||
if (vk->menu.textures[vk->menu.last_index].image != VK_NULL_HANDLE)
|
if (vk->menu.textures[vk->menu.last_index].image != VK_NULL_HANDLE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -938,7 +938,7 @@ static void mui_draw_bg(menu_display_ctx_draw_t *draw)
|
||||||
menu_display_blend_end();
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mui_frame(void *data)
|
static void mui_frame(void *data, video_frame_info_t *video_info)
|
||||||
{
|
{
|
||||||
float black_bg[16] = {
|
float black_bg[16] = {
|
||||||
0, 0, 0, 0.75,
|
0, 0, 0, 0.75,
|
||||||
|
|
|
@ -302,7 +302,7 @@ static void nk_menu_main(nk_menu_handle_t *nk)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void nk_menu_frame(void *data)
|
static void nk_menu_frame(void *data, video_frame_info_t *video_info)
|
||||||
{
|
{
|
||||||
float white_bg[16]= {
|
float white_bg[16]= {
|
||||||
0.98, 0.98, 0.98, 1,
|
0.98, 0.98, 0.98, 1,
|
||||||
|
|
|
@ -2553,7 +2553,7 @@ static void xmb_draw_dark_layer(
|
||||||
menu_display_blend_end();
|
menu_display_blend_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_frame(void *data)
|
static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||||
{
|
{
|
||||||
size_t selection;
|
size_t selection;
|
||||||
size_t percent_width = 0;
|
size_t percent_width = 0;
|
||||||
|
|
|
@ -399,7 +399,7 @@ end:
|
||||||
string_list_free(list);
|
string_list_free(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xui_frame(void *data)
|
static void xui_frame(void *data, video_frame_info_t *video_info)
|
||||||
{
|
{
|
||||||
XUIMessage msg;
|
XUIMessage msg;
|
||||||
XUIMessageRender msgRender;
|
XUIMessageRender msgRender;
|
||||||
|
|
|
@ -846,7 +846,7 @@ static int zarch_zui_render_pick_core(zui_t *zui)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void zarch_frame(void *data)
|
static void zarch_frame(void *data, video_frame_info_t *video_info)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
float coord_color[16];
|
float coord_color[16];
|
||||||
|
|
|
@ -302,6 +302,15 @@ const char *menu_driver_ident(void)
|
||||||
return menu_driver_ctx->ident;
|
return menu_driver_ctx->ident;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void menu_driver_frame(video_frame_info_t *video_info)
|
||||||
|
{
|
||||||
|
if (!menu_driver_alive)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (menu_driver_ctx->frame)
|
||||||
|
menu_driver_ctx->frame(menu_userdata, video_info);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* menu_update_libretro_info:
|
* menu_update_libretro_info:
|
||||||
*
|
*
|
||||||
|
@ -484,12 +493,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||||
|
|
||||||
menu_driver_data->state = 0;
|
menu_driver_data->state = 0;
|
||||||
break;
|
break;
|
||||||
case RARCH_MENU_CTL_FRAME:
|
|
||||||
if (!menu_driver_alive)
|
|
||||||
return false;
|
|
||||||
if (menu_driver_ctx->frame)
|
|
||||||
menu_driver_ctx->frame(menu_userdata);
|
|
||||||
break;
|
|
||||||
case RARCH_MENU_CTL_SET_PREVENT_POPULATE:
|
case RARCH_MENU_CTL_SET_PREVENT_POPULATE:
|
||||||
menu_driver_prevent_populate = true;
|
menu_driver_prevent_populate = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -99,7 +99,6 @@ enum rarch_menu_ctl_state
|
||||||
RARCH_MENU_CTL_BLIT_RENDER,
|
RARCH_MENU_CTL_BLIT_RENDER,
|
||||||
RARCH_MENU_CTL_RENDER,
|
RARCH_MENU_CTL_RENDER,
|
||||||
RARCH_MENU_CTL_RENDER_MESSAGEBOX,
|
RARCH_MENU_CTL_RENDER_MESSAGEBOX,
|
||||||
RARCH_MENU_CTL_FRAME,
|
|
||||||
RARCH_MENU_CTL_SET_PREVENT_POPULATE,
|
RARCH_MENU_CTL_SET_PREVENT_POPULATE,
|
||||||
RARCH_MENU_CTL_UNSET_PREVENT_POPULATE,
|
RARCH_MENU_CTL_UNSET_PREVENT_POPULATE,
|
||||||
RARCH_MENU_CTL_IS_PREVENT_POPULATE,
|
RARCH_MENU_CTL_IS_PREVENT_POPULATE,
|
||||||
|
@ -238,7 +237,7 @@ typedef struct menu_ctx_driver
|
||||||
void (*render_messagebox)(void *data, const char *msg);
|
void (*render_messagebox)(void *data, const char *msg);
|
||||||
int (*iterate)(void *data, void *userdata, enum menu_action action);
|
int (*iterate)(void *data, void *userdata, enum menu_action action);
|
||||||
void (*render)(void *data);
|
void (*render)(void *data);
|
||||||
void (*frame)(void *data);
|
void (*frame)(void *data, video_frame_info_t *video_info);
|
||||||
void* (*init)(void**);
|
void* (*init)(void**);
|
||||||
void (*free)(void*);
|
void (*free)(void*);
|
||||||
void (*context_reset)(void *data);
|
void (*context_reset)(void *data);
|
||||||
|
@ -390,6 +389,8 @@ bool menu_driver_is_binding_state(void);
|
||||||
|
|
||||||
void menu_driver_set_binding_state(bool on);
|
void menu_driver_set_binding_state(bool on);
|
||||||
|
|
||||||
|
void menu_driver_frame(video_frame_info_t *video_info);
|
||||||
|
|
||||||
extern menu_ctx_driver_t menu_ctx_xui;
|
extern menu_ctx_driver_t menu_ctx_xui;
|
||||||
extern menu_ctx_driver_t menu_ctx_rgui;
|
extern menu_ctx_driver_t menu_ctx_rgui;
|
||||||
extern menu_ctx_driver_t menu_ctx_mui;
|
extern menu_ctx_driver_t menu_ctx_mui;
|
||||||
|
|
Loading…
Reference in New Issue