mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Simplify driver_adjust_system_rates
This commit is contained in:
parent
40ab6f839a
commit
1e94070dca
27
retroarch.c
27
retroarch.c
@ -32643,23 +32643,22 @@ static void driver_adjust_system_rates(
|
||||
/* We won't be able to do VSync reliably when game FPS > monitor FPS. */
|
||||
p_rarch->runloop_force_nonblock = true;
|
||||
RARCH_LOG("[Video]: Game FPS > Monitor FPS. Cannot rely on VSync.\n");
|
||||
|
||||
if (VIDEO_DRIVER_GET_PTR_INTERNAL(p_rarch))
|
||||
{
|
||||
if (p_rarch->current_video->set_nonblock_state)
|
||||
p_rarch->current_video->set_nonblock_state(
|
||||
p_rarch->video_driver_data, true,
|
||||
video_driver_test_all_flags(GFX_CTX_FLAGS_ADAPTIVE_VSYNC) &&
|
||||
video_adaptive_vsync,
|
||||
video_swap_interval
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!VIDEO_DRIVER_GET_PTR_INTERNAL(p_rarch))
|
||||
return;
|
||||
|
||||
if (p_rarch->runloop_force_nonblock)
|
||||
{
|
||||
if (p_rarch->current_video->set_nonblock_state)
|
||||
p_rarch->current_video->set_nonblock_state(
|
||||
p_rarch->video_driver_data, true,
|
||||
video_driver_test_all_flags(GFX_CTX_FLAGS_ADAPTIVE_VSYNC) &&
|
||||
video_adaptive_vsync,
|
||||
video_swap_interval
|
||||
);
|
||||
}
|
||||
else
|
||||
if (VIDEO_DRIVER_GET_PTR_INTERNAL(p_rarch))
|
||||
driver_set_nonblock_state();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user