mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Take out cb_update_window_title and cb_get_metrics
This commit is contained in:
parent
5972ed9cc6
commit
19c68fad43
@ -793,9 +793,6 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width,
|
|||||||
menu_driver_frame(video_info);
|
menu_driver_frame(video_info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
video_info->cb_update_window_title(
|
|
||||||
video_info->context_data);
|
|
||||||
|
|
||||||
/* Update main surface: locate free page, blit and flip. */
|
/* Update main surface: locate free page, blit and flip. */
|
||||||
drm_surface_update(_drmvars, frame, _drmvars->main_surface);
|
drm_surface_update(_drmvars, frame, _drmvars->main_surface);
|
||||||
return true;
|
return true;
|
||||||
|
@ -349,7 +349,7 @@ static bool gdi_gfx_frame(void *data, const void *frame,
|
|||||||
|
|
||||||
InvalidateRect(hwnd, NULL, false);
|
InvalidateRect(hwnd, NULL, false);
|
||||||
|
|
||||||
video_info->cb_update_window_title(
|
gdi->ctx_driver->update_window_title(
|
||||||
video_info->context_data);
|
video_info->context_data);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -3060,8 +3060,8 @@ static bool gl2_frame(void *data, const void *frame,
|
|||||||
font_driver_render_msg(gl, msg, NULL, NULL);
|
font_driver_render_msg(gl, msg, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (video_info->cb_update_window_title)
|
if (gl->ctx_driver->update_window_title)
|
||||||
video_info->cb_update_window_title(context_data);
|
gl->ctx_driver->update_window_title(context_data);
|
||||||
|
|
||||||
/* Reset state which could easily mess up libretro core. */
|
/* Reset state which could easily mess up libretro core. */
|
||||||
if (gl->hw_render_fbo_init)
|
if (gl->hw_render_fbo_init)
|
||||||
@ -3095,12 +3095,13 @@ static bool gl2_frame(void *data, const void *frame,
|
|||||||
&& !runloop_is_slowmotion
|
&& !runloop_is_slowmotion
|
||||||
&& !runloop_is_paused)
|
&& !runloop_is_paused)
|
||||||
{
|
{
|
||||||
video_info->cb_swap_buffers(context_data);
|
if (gl->ctx_driver->swap_buffers)
|
||||||
|
gl->ctx_driver->swap_buffers(context_data);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
video_info->cb_swap_buffers(context_data);
|
gl->ctx_driver->swap_buffers(context_data);
|
||||||
|
|
||||||
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
|
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
|
||||||
if ( gl->have_sync
|
if ( gl->have_sync
|
||||||
|
@ -869,7 +869,7 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
|||||||
if (msg)
|
if (msg)
|
||||||
font_driver_render_msg(gl1, msg, NULL, NULL);
|
font_driver_render_msg(gl1, msg, NULL, NULL);
|
||||||
|
|
||||||
video_info->cb_update_window_title(
|
gl1->ctx_driver->update_window_title(
|
||||||
video_info->context_data);
|
video_info->context_data);
|
||||||
|
|
||||||
/* Screenshots. */
|
/* Screenshots. */
|
||||||
@ -888,12 +888,12 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
|||||||
&& !video_info->runloop_is_slowmotion
|
&& !video_info->runloop_is_slowmotion
|
||||||
&& !video_info->runloop_is_paused)
|
&& !video_info->runloop_is_paused)
|
||||||
{
|
{
|
||||||
video_info->cb_swap_buffers(video_info->context_data);
|
gl1->ctx_driver->swap_buffers(video_info->context_data);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
video_info->cb_swap_buffers(video_info->context_data);
|
gl1->ctx_driver->swap_buffers(video_info->context_data);
|
||||||
|
|
||||||
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
|
/* check if we are fast forwarding or in menu, if we are ignore hard sync */
|
||||||
if (video_info->hard_sync
|
if (video_info->hard_sync
|
||||||
|
@ -1949,7 +1949,7 @@ static bool gl_core_frame(void *data, const void *frame,
|
|||||||
font_driver_render_msg(gl, msg, NULL, NULL);
|
font_driver_render_msg(gl, msg, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
video_info->cb_update_window_title(context_data);
|
gl->ctx_driver->update_window_title(context_data);
|
||||||
|
|
||||||
if (gl->readback_buffer_screenshot)
|
if (gl->readback_buffer_screenshot)
|
||||||
{
|
{
|
||||||
@ -1973,11 +1973,11 @@ static bool gl_core_frame(void *data, const void *frame,
|
|||||||
&& !runloop_is_slowmotion
|
&& !runloop_is_slowmotion
|
||||||
&& !runloop_is_paused)
|
&& !runloop_is_paused)
|
||||||
{
|
{
|
||||||
video_info->cb_swap_buffers(context_data);
|
gl->ctx_driver->swap_buffers(context_data);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
video_info->cb_swap_buffers(context_data);
|
gl->ctx_driver->swap_buffers(context_data);
|
||||||
|
|
||||||
if (video_info->hard_sync &&
|
if (video_info->hard_sync &&
|
||||||
!input_driver_nonblock_state &&
|
!input_driver_nonblock_state &&
|
||||||
|
@ -454,9 +454,8 @@ static bool vg_frame(void *data, const void *frame,
|
|||||||
vg_draw_message(vg, msg);
|
vg_draw_message(vg, msg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
video_info->cb_update_window_title(
|
vg->ctx_driver->update_window_title(video_info->context_data);
|
||||||
video_info->context_data);
|
vg->ctx_driver->swap_buffers(video_info->context_data);
|
||||||
video_info->cb_swap_buffers(video_info->context_data);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -229,9 +229,6 @@ static bool vga_gfx_frame(void *data, const void *frame,
|
|||||||
if (msg)
|
if (msg)
|
||||||
font_driver_render_msg(data, msg, NULL, NULL);
|
font_driver_render_msg(data, msg, NULL, NULL);
|
||||||
|
|
||||||
video_info->cb_update_window_title(
|
|
||||||
video_info->context_data);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1659,7 +1659,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info,
|
|||||||
slock_unlock(vk->context->queue_lock);
|
slock_unlock(vk->context->queue_lock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
video_info->cb_swap_buffers(context_data);
|
vk->ctx_driver->swap_buffers(context_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool vulkan_frame(void *data, const void *frame,
|
static bool vulkan_frame(void *data, const void *frame,
|
||||||
@ -2116,10 +2116,10 @@ static bool vulkan_frame(void *data, const void *frame,
|
|||||||
slock_unlock(vk->context->queue_lock);
|
slock_unlock(vk->context->queue_lock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
video_info->cb_swap_buffers(context_data);
|
vk->ctx_driver->swap_buffers(context_data);
|
||||||
|
|
||||||
if (!vk->context->swap_interval_emulation_lock)
|
if (!vk->context->swap_interval_emulation_lock)
|
||||||
video_info->cb_update_window_title(context_data);
|
vk->ctx_driver->update_window_title(context_data);
|
||||||
|
|
||||||
/* Handle spurious swapchain invalidations as soon as we can,
|
/* Handle spurious swapchain invalidations as soon as we can,
|
||||||
* i.e. right after swap buffers. */
|
* i.e. right after swap buffers. */
|
||||||
|
@ -24141,9 +24141,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
|
|||||||
|
|
||||||
video_info->input_driver_nonblock_state = input_driver_nonblock_state;
|
video_info->input_driver_nonblock_state = input_driver_nonblock_state;
|
||||||
video_info->context_data = video_context_data;
|
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_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;
|
video_info->cb_set_resize = current_video_context.set_resize;
|
||||||
|
|
||||||
video_info->userdata = video_driver_get_ptr_internal(false);
|
video_info->userdata = video_driver_get_ptr_internal(false);
|
||||||
|
@ -1186,10 +1186,7 @@ typedef struct video_frame_info
|
|||||||
enum text_alignment text_align;
|
enum text_alignment text_align;
|
||||||
} osd_stat_params;
|
} osd_stat_params;
|
||||||
|
|
||||||
void (*cb_update_window_title)(void*);
|
|
||||||
void (*cb_swap_buffers)(void*);
|
void (*cb_swap_buffers)(void*);
|
||||||
bool (*cb_get_metrics)(void *data, enum display_metric_types type,
|
|
||||||
float *value);
|
|
||||||
bool (*cb_set_resize)(void*, unsigned, unsigned);
|
bool (*cb_set_resize)(void*, unsigned, unsigned);
|
||||||
|
|
||||||
void *context_data;
|
void *context_data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user