From 2f8b139131c40a7aec01ae19c5cf05b8a6851838 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 6 Jan 2022 19:20:08 +1100 Subject: [PATCH] [host] windows: set DwmFlush default to off This new feature while helps on some systems, others using freesync or higher refresh rates where the capture can't keep up will limit to fractions of the refresh rate. Better to disable and allow users to opt-in. --- host/platform/Windows/capture/DXGI/src/dxgi.c | 3 +-- host/platform/Windows/capture/NVFBC/src/nvfbc.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/host/platform/Windows/capture/DXGI/src/dxgi.c b/host/platform/Windows/capture/DXGI/src/dxgi.c index 2a6ffbe1..c0d29dd6 100644 --- a/host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/host/platform/Windows/capture/DXGI/src/dxgi.c @@ -168,7 +168,7 @@ static void dxgi_initOptions(void) .name = "dwmFlush", .description = "Use DwmFlush to sync the capture to the windows presentation inverval", .type = OPTION_TYPE_BOOL, - .value.x_bool = true + .value.x_bool = false }, {0} }; @@ -842,7 +842,6 @@ static CaptureResult dxgi_capture(void) } this->needsRelease = true; - if (frameInfo.LastPresentTime.QuadPart != 0) { tex = &this->texture[this->texWIndex]; diff --git a/host/platform/Windows/capture/NVFBC/src/nvfbc.c b/host/platform/Windows/capture/NVFBC/src/nvfbc.c index 0b96bd60..f8523ba2 100644 --- a/host/platform/Windows/capture/NVFBC/src/nvfbc.c +++ b/host/platform/Windows/capture/NVFBC/src/nvfbc.c @@ -154,7 +154,7 @@ static void nvfbc_initOptions(void) .name = "dwmFlush", .description = "Use DwmFlush to sync the capture to the windows presentation inverval", .type = OPTION_TYPE_BOOL, - .value.x_bool = true + .value.x_bool = false }, {0} };