mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 08:59:58 +00:00
Create wrapper functions menu_display_fb_set_dirty and menu_display_fb_unset_dirty
This commit is contained in:
parent
6feb1603f7
commit
a49e50896c
@ -1092,15 +1092,10 @@ bool event_command(enum event_command cmd)
|
||||
input_driver_poll();
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
||||
if (menu && menu_display_fb_in_use())
|
||||
menu->framebuf.dirty = true;
|
||||
menu_display_fb_set_dirty();
|
||||
|
||||
if (runloop->is_menu)
|
||||
event_command(EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
}
|
||||
if (runloop->is_menu)
|
||||
event_command(EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||
#endif
|
||||
break;
|
||||
case EVENT_CMD_CHEATS_DEINIT:
|
||||
|
@ -353,7 +353,7 @@ static void rgui_render(void)
|
||||
return;
|
||||
|
||||
/* ensures the framebuffer will be rendered on the screen */
|
||||
menu->framebuf.dirty = true;
|
||||
menu_display_fb_set_dirty();
|
||||
menu->animation_is_active = false;
|
||||
menu->label.is_updated = false;
|
||||
|
||||
@ -563,10 +563,8 @@ static void rgui_set_texture(void)
|
||||
|
||||
if (!menu)
|
||||
return;
|
||||
if (!menu->framebuf.dirty)
|
||||
return;
|
||||
|
||||
menu->framebuf.dirty = false;
|
||||
menu_display_fb_unset_dirty();
|
||||
|
||||
video_driver_set_texture_frame(
|
||||
menu->frame_buf.data, false,
|
||||
|
@ -147,7 +147,7 @@ static void rmenu_render(void)
|
||||
&& !menu->msg_force)
|
||||
return;
|
||||
|
||||
menu->framebuf.dirty = false;
|
||||
menu_display_fb_unset_dirty();
|
||||
menu->animation_is_active = false;
|
||||
menu->label.is_updated = false;
|
||||
|
||||
|
@ -542,7 +542,7 @@ static void rmenu_xui_render(void)
|
||||
runloop->is_menu && !menu->msg_force)
|
||||
return;
|
||||
|
||||
menu->framebuf.dirty = false;
|
||||
menu_display_fb_unset_dirty();
|
||||
menu->animation_is_active = false;
|
||||
menu->label.is_updated = false;
|
||||
|
||||
|
@ -169,7 +169,7 @@ void *menu_init(const void *data)
|
||||
|
||||
rarch_assert(menu->msg_queue = msg_queue_new(8));
|
||||
|
||||
menu->framebuf.dirty = true;
|
||||
menu_display_fb_set_dirty();
|
||||
|
||||
return menu;
|
||||
error:
|
||||
|
@ -30,6 +30,26 @@ bool menu_display_fb_in_use(void)
|
||||
return menu->frame_buf.data != NULL;
|
||||
}
|
||||
|
||||
void menu_display_fb_set_dirty(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return false;
|
||||
if (!menu_display_fb_in_use())
|
||||
return false;
|
||||
menu->framebuf.dirty = true;
|
||||
}
|
||||
|
||||
void menu_display_fb_unset_dirty(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return false;
|
||||
if (!menu_display_fb_in_use())
|
||||
return false;
|
||||
menu->framebuf.dirty = false;
|
||||
}
|
||||
|
||||
bool menu_display_update_pending(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
@ -29,6 +29,10 @@ void menu_display_fb(void);
|
||||
|
||||
bool menu_display_fb_in_use(void);
|
||||
|
||||
void menu_display_fb_set_dirty(void);
|
||||
|
||||
void menu_display_fb_unset_dirty(void);
|
||||
|
||||
void menu_display_free(menu_handle_t *menu);
|
||||
|
||||
bool menu_display_init(menu_handle_t *menu);
|
||||
|
@ -1843,8 +1843,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
case DISPLAYLIST_HELP:
|
||||
menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr);
|
||||
menu->push_start_screen = false;
|
||||
if (menu_display_fb_in_use())
|
||||
menu->framebuf.dirty = true;
|
||||
menu_display_fb_set_dirty();
|
||||
break;
|
||||
case DISPLAYLIST_MAIN_MENU:
|
||||
case DISPLAYLIST_SETTINGS:
|
||||
|
@ -437,10 +437,7 @@ int menu_entry_iterate(unsigned action)
|
||||
return -1;
|
||||
|
||||
if (action != MENU_ACTION_NOOP || menu_needs_refresh() || menu_display_update_pending())
|
||||
{
|
||||
if (menu_display_fb_in_use())
|
||||
menu->framebuf.dirty = true;
|
||||
}
|
||||
menu_display_fb_set_dirty();
|
||||
|
||||
cbs = (menu_file_list_cbs_t*)menu_list_get_last_stack_actiondata(menu_list);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user