mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
video_context_driver_swap_interval - add in safeguard
This commit is contained in:
parent
9017e209e8
commit
bf75e6b9d7
@ -3204,9 +3204,11 @@ bool video_context_driver_get_video_output_size(gfx_ctx_size_t *size_data)
|
||||
|
||||
bool video_context_driver_swap_interval(int *interval)
|
||||
{
|
||||
gfx_ctx_flags_t flags;
|
||||
int current_interval = *interval;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool adaptive_vsync_enabled = settings->bools.video_adaptive_vsync;
|
||||
bool adaptive_vsync_enabled = video_driver_get_all_flags(&flags, GFX_CTX_FLAGS_ADAPTIVE_VSYNC) && settings->bools.video_adaptive_vsync;
|
||||
|
||||
if (!current_video_context.swap_interval)
|
||||
return false;
|
||||
if (adaptive_vsync_enabled && current_interval == 1)
|
||||
|
Loading…
Reference in New Issue
Block a user