From 4f9be3f4576b040c8ef4a6820f798d9c1543ed2a Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Fri, 8 Apr 2022 10:04:09 +0200 Subject: [PATCH] work-around a bug in Windows 11's Direct3D9 VSync timer (#501) * work-around a bug in Windows 11's Direct3D9 VSync timer * set direct3d11 on all versions of Windows --- Source/i_video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/i_video.c b/Source/i_video.c index 0b743a59..5db3face 100644 --- a/Source/i_video.c +++ b/Source/i_video.c @@ -1499,6 +1499,11 @@ static void I_InitGraphicsMode(void) texture = NULL; } +#ifdef _WIN32 + // [FG] work-around a bug in Windows 11's Direct3D9 VSync timer + SDL_SetHint(SDL_HINT_RENDER_DRIVER, "direct3d11"); +#endif + renderer = SDL_CreateRenderer(screen, -1, flags); // [FG] try again without hardware acceleration