mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 23:35:55 +00:00
Fix tearing with DXVA2 in full screen mode
This commit is contained in:
parent
af503a9147
commit
cb154ad3d4
@ -349,7 +349,13 @@ bool DXVA2Renderer::initialize(SDL_Window* window, int videoFormat, int width, i
|
||||
// D3DCREATE_MULTITHREADED to IDirect3D9::CreateDevice().
|
||||
SDL_SetHint(SDL_HINT_RENDER_DIRECT3D_THREADSAFE, "1");
|
||||
|
||||
m_SdlRenderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
|
||||
// We want VSYNC when running in full-screen. DWM will give us
|
||||
// tear-free video when running composited (windowed) without any
|
||||
// extra latency waiting for VSYNC.
|
||||
m_SdlRenderer = SDL_CreateRenderer(window, -1,
|
||||
SDL_RENDERER_ACCELERATED |
|
||||
((SDL_GetWindowFlags(window) & SDL_WINDOW_FULLSCREEN) ?
|
||||
SDL_RENDERER_PRESENTVSYNC : 0));
|
||||
if (!m_SdlRenderer) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"SDL_CreateRenderer() failed: %s",
|
||||
|
Loading…
x
Reference in New Issue
Block a user