mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-03 15:54:39 +00:00
Revert "Move update_window_title to main thread - this should resolve some"
This reverts commit 442608981d2ca529ce89a6df921520e9e9d534c8.
This commit is contained in:
parent
442608981d
commit
ed8e440b0d
@ -793,6 +793,9 @@ 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,6 +362,9 @@ 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,6 +3076,10 @@ 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,6 +883,9 @@ 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,6 +1732,9 @@ 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,6 +442,8 @@ 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,6 +242,9 @@ 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,6 +2094,10 @@ 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,6 +19383,10 @@ 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)
|
||||
{
|
||||
}
|
||||
@ -19484,6 +19488,9 @@ 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;
|
||||
|
||||
@ -19512,6 +19519,7 @@ 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;
|
||||
@ -21279,12 +21287,6 @@ 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. */
|
||||
@ -21530,6 +21532,7 @@ 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,6 +1197,7 @@ 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