mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Remove video_driver_set_video_cache_context_ack - replace with single line
This commit is contained in:
parent
f062b74e26
commit
e108fefc41
@ -1756,7 +1756,7 @@ static bool vulkan_context_init_device(gfx_ctx_vulkan_data_t *vk)
|
||||
vk->context.device = cached_device_vk;
|
||||
cached_device_vk = NULL;
|
||||
|
||||
video_driver_set_video_cache_context_ack();
|
||||
video_state_get_ptr()->flags |= VIDEO_FLAG_CACHE_CONTEXT_ACK;
|
||||
RARCH_LOG("[Vulkan]: Using cached Vulkan context.\n");
|
||||
}
|
||||
else if (vkCreateDevice(vk->context.gpu, &device_info,
|
||||
|
@ -241,12 +241,13 @@ static bool sdl_ctx_set_video_mode(void *data,
|
||||
#endif
|
||||
|
||||
if (sdl->ctx)
|
||||
video_driver_set_video_cache_context_ack();
|
||||
{
|
||||
video_state_get_ptr()->flags |= VIDEO_FLAG_CACHE_CONTEXT_ACK;
|
||||
RARCH_LOG("[SDL_GL]: Using cached GL context.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
sdl->ctx = SDL_GL_CreateContext(sdl->win);
|
||||
|
||||
if (!sdl->ctx)
|
||||
if (!(sdl->ctx = SDL_GL_CreateContext(sdl->win)))
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
|
@ -186,8 +186,8 @@ static void create_gl_context(HWND hwnd, bool *quit)
|
||||
|
||||
if (win32_hrc)
|
||||
{
|
||||
video_state_get_ptr()->flags |= VIDEO_FLAG_CACHE_CONTEXT_ACK;
|
||||
RARCH_LOG("[WGL]: Using cached GL context.\n");
|
||||
video_driver_set_video_cache_context_ack();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -846,7 +846,7 @@ static bool gfx_ctx_x_set_video_mode(void *data,
|
||||
}
|
||||
else
|
||||
{
|
||||
video_driver_set_video_cache_context_ack();
|
||||
video_state_get_ptr()->flags |= VIDEO_FLAG_CACHE_CONTEXT_ACK;
|
||||
RARCH_LOG("[GLX]: Using cached GL context.\n");
|
||||
}
|
||||
|
||||
|
@ -2457,12 +2457,6 @@ const struct retro_hw_render_context_negotiation_interface *
|
||||
return video_st->hw_render_context_negotiation;
|
||||
}
|
||||
|
||||
void video_driver_set_video_cache_context_ack(void)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
video_st->flags |= VIDEO_FLAG_CACHE_CONTEXT_ACK;
|
||||
}
|
||||
|
||||
bool video_driver_get_viewport_info(struct video_viewport *viewport)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
@ -3135,16 +3129,17 @@ bool video_context_driver_set_flags(gfx_ctx_flags_t *flags)
|
||||
if (!flags)
|
||||
return false;
|
||||
|
||||
if (video_st->current_video_context.set_flags)
|
||||
if (!video_st->current_video_context.set_flags)
|
||||
{
|
||||
video_st->current_video_context.set_flags(
|
||||
video_st->context_data, flags->flags);
|
||||
return true;
|
||||
video_st->deferred_flag_data.flags = flags->flags;
|
||||
video_st->flags |= VIDEO_FLAG_DEFERRED_VIDEO_CTX_DRIVER_SET_FLAGS;
|
||||
return false;
|
||||
}
|
||||
|
||||
video_st->deferred_flag_data.flags = flags->flags;
|
||||
video_st->flags |= VIDEO_FLAG_DEFERRED_VIDEO_CTX_DRIVER_SET_FLAGS;
|
||||
return false;
|
||||
video_st->current_video_context.set_flags(
|
||||
video_st->context_data, flags->flags);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
enum gfx_ctx_api video_context_driver_get_api(void)
|
||||
@ -4181,12 +4176,12 @@ void video_driver_reinit(int flags)
|
||||
struct retro_hw_render_callback *hwr =
|
||||
VIDEO_DRIVER_GET_HW_CONTEXT_INTERNAL(video_st);
|
||||
if (hwr->cache_context != false)
|
||||
video_st->flags |= VIDEO_FLAG_CACHE_CONTEXT;
|
||||
video_st->flags |= VIDEO_FLAG_CACHE_CONTEXT;
|
||||
else
|
||||
video_st->flags &= ~VIDEO_FLAG_CACHE_CONTEXT;
|
||||
video_st->flags &= ~VIDEO_FLAG_CACHE_CONTEXT_ACK;
|
||||
video_st->flags &= ~VIDEO_FLAG_CACHE_CONTEXT;
|
||||
video_st->flags &= ~VIDEO_FLAG_CACHE_CONTEXT_ACK;
|
||||
video_driver_reinit_context(settings, flags);
|
||||
video_st->flags &= ~VIDEO_FLAG_CACHE_CONTEXT;
|
||||
video_st->flags &= ~VIDEO_FLAG_CACHE_CONTEXT;
|
||||
}
|
||||
|
||||
#define FRAME_DELAY_AUTO_DEBUG 0
|
||||
@ -4285,17 +4280,17 @@ void video_frame_delay_auto(video_driver_state_t *video_st, video_frame_delay_au
|
||||
mode = 3;
|
||||
/* Boost med/max spikes */
|
||||
else if (
|
||||
frame_time_count_pos >= frame_time_frames_half
|
||||
( frame_time_count_pos >= frame_time_frames_half)
|
||||
&& ( frame_time_count_max > 0
|
||||
|| frame_time_count_med > 1)
|
||||
&& frame_time_count_max == frame_time_count_med
|
||||
&& frame_time_delta < frame_time_target
|
||||
&& ( frame_time_count_max == frame_time_count_med)
|
||||
&& ( frame_time_delta < frame_time_target)
|
||||
)
|
||||
mode = 4;
|
||||
/* Ignore */
|
||||
else if (
|
||||
frame_time_delta > frame_time_target
|
||||
&& frame_time_count_med == 0
|
||||
(frame_time_delta > frame_time_target)
|
||||
&& (frame_time_count_med == 0)
|
||||
)
|
||||
mode = -1;
|
||||
|
||||
|
@ -1028,8 +1028,6 @@ struct retro_hw_render_callback *video_driver_get_hw_context(void);
|
||||
const struct retro_hw_render_context_negotiation_interface
|
||||
*video_driver_get_context_negotiation_interface(void);
|
||||
|
||||
void video_driver_set_video_cache_context_ack(void);
|
||||
|
||||
bool video_driver_get_viewport_info(struct video_viewport *viewport);
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user