mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 11:18:25 +00:00
menu drivers will have their own frame count; this fixes the
tickering issues with threaded video mode
This commit is contained in:
parent
12d0073d50
commit
25c8baeefe
@ -101,6 +101,7 @@ typedef struct mui_handle
|
||||
unsigned glyph_width2;
|
||||
char box_message[1024];
|
||||
bool mouse_show;
|
||||
uint64_t frame_count;
|
||||
|
||||
struct
|
||||
{
|
||||
@ -793,8 +794,7 @@ static void mui_render_menu_list(
|
||||
float sum = 0;
|
||||
size_t i = 0;
|
||||
file_list_t *list = NULL;
|
||||
uint64_t frame_count =
|
||||
video_info->frame_count;
|
||||
uint64_t frame_count = mui->frame_count;
|
||||
unsigned header_height =
|
||||
menu_display_get_header_height();
|
||||
|
||||
@ -1006,7 +1006,6 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
|
||||
size_t selection = 0;
|
||||
size_t title_margin = 0;
|
||||
mui_handle_t *mui = (mui_handle_t*)data;
|
||||
uint64_t frame_count = video_info->frame_count;
|
||||
bool background_rendered = false;
|
||||
bool libretro_running = video_info->libretro_running;
|
||||
|
||||
@ -1025,6 +1024,8 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
|
||||
if (!mui)
|
||||
return;
|
||||
|
||||
mui->frame_count++;
|
||||
|
||||
msg[0] = title[0] = title_buf[0] = title_msg[0] = '\0';
|
||||
|
||||
switch (video_info->materialui_color_theme)
|
||||
@ -1336,7 +1337,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
ticker.s = title_buf;
|
||||
ticker.len = ticker_limit;
|
||||
ticker.idx = frame_count / 100;
|
||||
ticker.idx = mui->frame_count / 100;
|
||||
ticker.str = title;
|
||||
ticker.selected = true;
|
||||
|
||||
@ -1359,7 +1360,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
ticker.s = title_buf_msg_tmp;
|
||||
ticker.len = ticker_limit;
|
||||
ticker.idx = frame_count / 20;
|
||||
ticker.idx = mui->frame_count / 20;
|
||||
ticker.str = title_buf_msg;
|
||||
ticker.selected = true;
|
||||
|
||||
|
@ -385,7 +385,8 @@ static void rgui_blit_cursor(void)
|
||||
static void rgui_frame(void *data, video_frame_info_t *video_info)
|
||||
{
|
||||
rgui_t *rgui = (rgui_t*)data;
|
||||
rgui->frame_count = (unsigned)video_info->frame_count;
|
||||
|
||||
rgui->frame_count++;
|
||||
}
|
||||
|
||||
static void rgui_render(void *data)
|
||||
@ -403,7 +404,7 @@ static void rgui_render(void *data)
|
||||
bool msg_force = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rgui_t *rgui = (rgui_t*)data;
|
||||
uint64_t frame_count = rgui ? rgui->frame_count : 0;
|
||||
uint64_t frame_count = rgui->frame_count;
|
||||
|
||||
msg[0] = title[0] = title_buf[0] = title_msg[0] = '\0';
|
||||
|
||||
|
@ -175,7 +175,6 @@ enum
|
||||
#define XMB_SYSTEM_TAB_END XMB_SYSTEM_TAB_HISTORY
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct xmb_handle
|
||||
{
|
||||
file_list_t *menu_stack_old;
|
||||
@ -198,6 +197,7 @@ typedef struct xmb_handle
|
||||
char background_file_path[PATH_MAX_LENGTH];
|
||||
char thumbnail_file_path[PATH_MAX_LENGTH];
|
||||
char savestate_thumbnail_file_path[PATH_MAX_LENGTH];
|
||||
uint64_t frame_count;
|
||||
|
||||
bool mouse_show;
|
||||
|
||||
@ -2100,7 +2100,7 @@ static void xmb_draw_items(
|
||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||
xmb_node_t *core_node = NULL;
|
||||
size_t end = 0;
|
||||
uint64_t frame_count = video_info->frame_count;
|
||||
uint64_t frame_count = xmb->frame_count;
|
||||
|
||||
if (!list || !list->size)
|
||||
return;
|
||||
@ -2584,6 +2584,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
if (!xmb)
|
||||
return;
|
||||
|
||||
xmb->frame_count++;
|
||||
|
||||
menu_disp_info.shadows_enable = video_info->xmb_shadows_enable;
|
||||
|
||||
msg[0] = '\0';
|
||||
|
@ -110,6 +110,7 @@ typedef struct zarch_handle
|
||||
unsigned height;
|
||||
video_font_raster_block_t tmp_block;
|
||||
unsigned hash;
|
||||
uint64_t frame_count;
|
||||
|
||||
struct {
|
||||
unsigned active;
|
||||
@ -323,7 +324,7 @@ static bool zarch_zui_list_item(video_frame_info_t *video_info,
|
||||
int y2 = y1 + 50;
|
||||
bool active = zarch_zui_check_button_up(zui, id, x1, y1, x2, y2);
|
||||
const float *bg = zui_bg_panel;
|
||||
uint64_t frame_count = video_info->frame_count;
|
||||
uint64_t frame_count = zui->frame_count;
|
||||
|
||||
title_buf[0] = '\0';
|
||||
|
||||
@ -876,6 +877,8 @@ static void zarch_frame(void *data, video_frame_info_t *video_info)
|
||||
if (!zui)
|
||||
return;
|
||||
|
||||
zui->frame_count++;
|
||||
|
||||
video_driver_get_size(&zui->width, &zui->height);
|
||||
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
|
Loading…
Reference in New Issue
Block a user