mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +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();
|
input_driver_poll();
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
{
|
menu_display_fb_set_dirty();
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
|
||||||
|
|
||||||
if (menu && menu_display_fb_in_use())
|
|
||||||
menu->framebuf.dirty = true;
|
|
||||||
|
|
||||||
if (runloop->is_menu)
|
if (runloop->is_menu)
|
||||||
event_command(EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
event_command(EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case EVENT_CMD_CHEATS_DEINIT:
|
case EVENT_CMD_CHEATS_DEINIT:
|
||||||
|
@ -353,7 +353,7 @@ static void rgui_render(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* ensures the framebuffer will be rendered on the screen */
|
/* ensures the framebuffer will be rendered on the screen */
|
||||||
menu->framebuf.dirty = true;
|
menu_display_fb_set_dirty();
|
||||||
menu->animation_is_active = false;
|
menu->animation_is_active = false;
|
||||||
menu->label.is_updated = false;
|
menu->label.is_updated = false;
|
||||||
|
|
||||||
@ -563,10 +563,8 @@ static void rgui_set_texture(void)
|
|||||||
|
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
if (!menu->framebuf.dirty)
|
|
||||||
return;
|
|
||||||
|
|
||||||
menu->framebuf.dirty = false;
|
menu_display_fb_unset_dirty();
|
||||||
|
|
||||||
video_driver_set_texture_frame(
|
video_driver_set_texture_frame(
|
||||||
menu->frame_buf.data, false,
|
menu->frame_buf.data, false,
|
||||||
|
@ -147,7 +147,7 @@ static void rmenu_render(void)
|
|||||||
&& !menu->msg_force)
|
&& !menu->msg_force)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu->framebuf.dirty = false;
|
menu_display_fb_unset_dirty();
|
||||||
menu->animation_is_active = false;
|
menu->animation_is_active = false;
|
||||||
menu->label.is_updated = false;
|
menu->label.is_updated = false;
|
||||||
|
|
||||||
|
@ -542,7 +542,7 @@ static void rmenu_xui_render(void)
|
|||||||
runloop->is_menu && !menu->msg_force)
|
runloop->is_menu && !menu->msg_force)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
menu->framebuf.dirty = false;
|
menu_display_fb_unset_dirty();
|
||||||
menu->animation_is_active = false;
|
menu->animation_is_active = false;
|
||||||
menu->label.is_updated = 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));
|
rarch_assert(menu->msg_queue = msg_queue_new(8));
|
||||||
|
|
||||||
menu->framebuf.dirty = true;
|
menu_display_fb_set_dirty();
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
error:
|
error:
|
||||||
|
@ -30,6 +30,26 @@ bool menu_display_fb_in_use(void)
|
|||||||
return menu->frame_buf.data != NULL;
|
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)
|
bool menu_display_update_pending(void)
|
||||||
{
|
{
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
|
@ -29,6 +29,10 @@ void menu_display_fb(void);
|
|||||||
|
|
||||||
bool menu_display_fb_in_use(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);
|
void menu_display_free(menu_handle_t *menu);
|
||||||
|
|
||||||
bool menu_display_init(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:
|
case DISPLAYLIST_HELP:
|
||||||
menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr);
|
menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr);
|
||||||
menu->push_start_screen = false;
|
menu->push_start_screen = false;
|
||||||
if (menu_display_fb_in_use())
|
menu_display_fb_set_dirty();
|
||||||
menu->framebuf.dirty = true;
|
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_MAIN_MENU:
|
case DISPLAYLIST_MAIN_MENU:
|
||||||
case DISPLAYLIST_SETTINGS:
|
case DISPLAYLIST_SETTINGS:
|
||||||
|
@ -437,10 +437,7 @@ int menu_entry_iterate(unsigned action)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (action != MENU_ACTION_NOOP || menu_needs_refresh() || menu_display_update_pending())
|
if (action != MENU_ACTION_NOOP || menu_needs_refresh() || menu_display_update_pending())
|
||||||
{
|
menu_display_fb_set_dirty();
|
||||||
if (menu_display_fb_in_use())
|
|
||||||
menu->framebuf.dirty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
cbs = (menu_file_list_cbs_t*)menu_list_get_last_stack_actiondata(menu_list);
|
cbs = (menu_file_list_cbs_t*)menu_list_get_last_stack_actiondata(menu_list);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user