mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Move update_window_title to main thread - this should resolve some
concurrency issues on OSX as well
This commit is contained in:
parent
79c336b6fd
commit
442608981d
@ -793,9 +793,6 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width,
|
||||
menu_driver_frame(video_info);
|
||||
#endif
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
/* Update main surface: locate free page, blit and flip. */
|
||||
drm_surface_update(_drmvars, frame, _drmvars->main_surface);
|
||||
return true;
|
||||
|
@ -362,9 +362,6 @@ static bool gdi_gfx_frame(void *data, const void *frame,
|
||||
|
||||
InvalidateRect(hwnd, NULL, false);
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3076,10 +3076,6 @@ static bool gl2_frame(void *data, const void *frame,
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
}
|
||||
|
||||
if (video_info->cb_update_window_title)
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
/* Reset state which could easily mess up libretro core. */
|
||||
if (gl->hw_render_fbo_init)
|
||||
{
|
||||
|
@ -883,9 +883,6 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
/* Screenshots. */
|
||||
if (gl1->readback_buffer_screenshot)
|
||||
gl1_readback(gl1,
|
||||
|
@ -1732,9 +1732,6 @@ static bool gl_core_frame(void *data, const void *frame,
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
}
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
if (gl->readback_buffer_screenshot)
|
||||
{
|
||||
/* For screenshots, just do the regular slow readback. */
|
||||
|
@ -442,8 +442,6 @@ static bool vg_frame(void *data, const void *frame,
|
||||
vg_draw_message(vg, msg);
|
||||
#endif
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
video_info->cb_swap_buffers(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
|
@ -242,9 +242,6 @@ static bool vga_gfx_frame(void *data, const void *frame,
|
||||
if (msg)
|
||||
font_driver_render_msg(video_info, NULL, msg, NULL);
|
||||
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2094,10 +2094,6 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||
|
||||
video_info->cb_swap_buffers(video_info->context_data, video_info);
|
||||
|
||||
if (!vk->context->swap_interval_emulation_lock)
|
||||
video_info->cb_update_window_title(
|
||||
video_info->context_data, video_info);
|
||||
|
||||
/* Handle spurious swapchain invalidations as soon as we can,
|
||||
* i.e. right after swap buffers. */
|
||||
if (vk->should_resize)
|
||||
|
15
retroarch.c
15
retroarch.c
@ -19383,10 +19383,6 @@ bool video_driver_started_fullscreen(void)
|
||||
|
||||
/* Stub functions */
|
||||
|
||||
static void update_window_title_null(void *data, void *data2)
|
||||
{
|
||||
}
|
||||
|
||||
static void swap_buffers_null(void *data, void *data2)
|
||||
{
|
||||
}
|
||||
@ -19488,9 +19484,6 @@ static void video_context_driver_reset(void)
|
||||
if (!current_video_context.get_metrics)
|
||||
current_video_context.get_metrics = get_metrics_null;
|
||||
|
||||
if (!current_video_context.update_window_title)
|
||||
current_video_context.update_window_title = update_window_title_null;
|
||||
|
||||
if (!current_video_context.set_resize)
|
||||
current_video_context.set_resize = set_resize_null;
|
||||
|
||||
@ -19519,7 +19512,6 @@ void video_context_driver_destroy(void)
|
||||
current_video_context.get_video_output_next = NULL;
|
||||
current_video_context.get_metrics = get_metrics_null;
|
||||
current_video_context.translate_aspect = NULL;
|
||||
current_video_context.update_window_title = update_window_title_null;
|
||||
current_video_context.check_window = NULL;
|
||||
current_video_context.set_resize = set_resize_null;
|
||||
current_video_context.suppress_screensaver = NULL;
|
||||
@ -21287,6 +21279,12 @@ static void video_driver_frame(const void *data, unsigned width,
|
||||
video_driver_frame_count,
|
||||
(unsigned)pitch, video_driver_msg, &video_info);
|
||||
|
||||
/* TODO/FIXME - if we are in fullscreen, we should
|
||||
* not call this function */
|
||||
if (current_video_context.update_window_title)
|
||||
current_video_context.update_window_title(
|
||||
video_info.context_data, &video_info);
|
||||
|
||||
video_driver_frame_count++;
|
||||
|
||||
/* Display the FPS, with a higher priority. */
|
||||
@ -21532,7 +21530,6 @@ void video_driver_build_info(video_frame_info_t *video_info)
|
||||
|
||||
video_info->input_driver_nonblock_state = input_driver_nonblock_state;
|
||||
video_info->context_data = video_context_data;
|
||||
video_info->cb_update_window_title = current_video_context.update_window_title;
|
||||
video_info->cb_swap_buffers = current_video_context.swap_buffers;
|
||||
video_info->cb_get_metrics = current_video_context.get_metrics;
|
||||
video_info->cb_set_resize = current_video_context.set_resize;
|
||||
|
@ -1197,7 +1197,6 @@ typedef struct video_frame_info
|
||||
enum text_alignment text_align;
|
||||
} osd_stat_params;
|
||||
|
||||
void (*cb_update_window_title)(void*, void *);
|
||||
void (*cb_swap_buffers)(void*, void *);
|
||||
bool (*cb_get_metrics)(void *data, enum display_metric_types type,
|
||||
float *value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user