mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
Remove video_driver_cached_frame_render wrapper function
This commit is contained in:
parent
c70ac3986c
commit
456c4c4d58
@ -2301,7 +2301,10 @@ bool command_event(enum event_command cmd, void *data)
|
||||
command_event(CMD_EVENT_AUDIO_STOP, NULL);
|
||||
|
||||
if (settings->video.black_frame_insertion)
|
||||
video_driver_cached_frame_render();
|
||||
{
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
video_driver_cached_frame();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2423,7 +2423,8 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
|
||||
goto error;
|
||||
}
|
||||
|
||||
video_driver_cached_frame_render();
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
video_driver_cached_frame();
|
||||
|
||||
video_frame_convert_rgba_to_bgr(
|
||||
(const void*)gl->readback_buffer_screenshot,
|
||||
|
@ -630,7 +630,8 @@ static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer)
|
||||
performance_counter_init(&sdl2_gfx_read_viewport, "sdl2_gfx_read_viewport");
|
||||
performance_counter_start(&sdl2_gfx_read_viewport);
|
||||
|
||||
video_driver_cached_frame_render();
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
video_driver_cached_frame();
|
||||
|
||||
surf = SDL_GetWindowSurface(vid->window);
|
||||
bgr24 = SDL_ConvertSurfaceFormat(surf, SDL_PIXELFORMAT_BGR24, 0);
|
||||
|
@ -2274,7 +2274,9 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer)
|
||||
* with conversion. */
|
||||
|
||||
vk->readback.pending = true;
|
||||
video_driver_cached_frame_render();
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
video_driver_cached_frame();
|
||||
|
||||
vkQueueWaitIdle(vk->context->queue);
|
||||
|
||||
if (!staging->mapped)
|
||||
|
@ -1112,7 +1112,7 @@ void video_driver_set_pixel_format(enum retro_pixel_format fmt)
|
||||
*
|
||||
* Renders the current video frame.
|
||||
**/
|
||||
static bool video_driver_cached_frame(void)
|
||||
bool video_driver_cached_frame(void)
|
||||
{
|
||||
retro_ctx_frame_info_t info;
|
||||
void *recording = recording_driver_get_data_ptr();
|
||||
@ -1693,15 +1693,6 @@ bool video_driver_cached_frame_has_valid_framebuffer(void)
|
||||
return frame_cache_data == RETRO_HW_FRAME_BUFFER_VALID;
|
||||
}
|
||||
|
||||
bool video_driver_cached_frame_render(void)
|
||||
{
|
||||
if (!current_video)
|
||||
return false;
|
||||
if (runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
return true; /* Maybe return false here for indication of idleness? */
|
||||
return video_driver_cached_frame();
|
||||
}
|
||||
|
||||
bool video_driver_is_alive(void)
|
||||
{
|
||||
if (current_video)
|
||||
|
@ -325,7 +325,7 @@ bool video_driver_find_driver(void);
|
||||
void video_driver_apply_state_changes(void);
|
||||
bool video_driver_read_viewport(uint8_t *buffer);
|
||||
bool video_driver_cached_frame_has_valid_framebuffer(void);
|
||||
bool video_driver_cached_frame_render(void);
|
||||
bool video_driver_cached_frame(void);
|
||||
bool video_driver_is_alive(void);
|
||||
bool video_driver_is_focused(void);
|
||||
bool video_driver_has_windowed(void);
|
||||
|
@ -308,7 +308,9 @@ bool menu_display_libretro(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
return video_driver_cached_frame_render();
|
||||
if (runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
return true; /* Maybe return false here for indication of idleness? */
|
||||
return video_driver_cached_frame();
|
||||
}
|
||||
|
||||
void menu_display_set_width(unsigned width)
|
||||
|
@ -996,7 +996,8 @@ static enum runloop_state runloop_check_state(
|
||||
if (runloop_cmd_triggered(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY))
|
||||
{
|
||||
command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL);
|
||||
video_driver_cached_frame_render();
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
video_driver_cached_frame();
|
||||
}
|
||||
|
||||
if (!check_is_oneshot)
|
||||
@ -1077,7 +1078,10 @@ static enum runloop_state runloop_check_state(
|
||||
{
|
||||
/* Checks if slowmotion toggle/hold was being pressed and/or held. */
|
||||
if (settings->video.black_frame_insertion)
|
||||
video_driver_cached_frame_render();
|
||||
{
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
video_driver_cached_frame();
|
||||
}
|
||||
|
||||
if (state_manager_frame_is_reversed())
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_SLOW_MOTION_REWIND), 2, 30, true);
|
||||
|
@ -300,7 +300,8 @@ static bool take_screenshot_choice(const char *name_base)
|
||||
{
|
||||
/* Avoid taking screenshot of GUI overlays. */
|
||||
video_driver_set_texture_enable(false, false);
|
||||
video_driver_cached_frame_render();
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
video_driver_cached_frame();
|
||||
#if defined(VITA)
|
||||
return take_screenshot_raw(name_base, NULL);
|
||||
#else
|
||||
@ -361,7 +362,10 @@ bool take_screenshot(void)
|
||||
runloop_msg_queue_push(msg, 1, is_paused ? 1 : 180, true);
|
||||
|
||||
if (is_paused)
|
||||
video_driver_cached_frame_render();
|
||||
{
|
||||
if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL))
|
||||
video_driver_cached_frame();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user