(wgl_ctx) Also account for swap interval when setting fullscreen refresh rate

This commit is contained in:
Monroe88 2015-10-21 18:57:06 -05:00
parent 4afbd0682b
commit a2e4a39ecf

View File

@ -489,9 +489,9 @@ static bool gfx_ctx_wgl_set_video_mode(void *data,
/* Windows only reports the refresh rates for modelines as
* an integer, so video.refresh_rate needs to be rounded. Also, account
* for black frame insertion using video.refresh_rate set to half
* of the display refresh rate. */
* of the display refresh rate, as well as higher vsync swap intervals. */
refresh_mod = settings->video.black_frame_insertion ? 2.0f : 1.0f;
refresh = round(settings->video.refresh_rate * refresh_mod);
refresh = round(settings->video.refresh_rate * refresh_mod * settings->video.swap_interval);
windowed_full = settings->video.windowed_fullscreen;