diff --git a/docs/source/about/advanced_usage.rst b/docs/source/about/advanced_usage.rst index d7f546e8..b8d15289 100644 --- a/docs/source/about/advanced_usage.rst +++ b/docs/source/about/advanced_usage.rst @@ -413,27 +413,6 @@ resolutions 3840x1600, ] -dwmflush -^^^^^^^^ - -**Description** - Invoke DwmFlush() to sync screen capture to the Windows presentation interval. - - .. Caution:: Applies to Windows only. Alleviates visual stuttering during mouse movement. - If enabled, this feature will automatically deactivate if the client framerate exceeds - the host monitor's current refresh rate. - - .. Note:: If you disable this option, you may see video stuttering during mouse movement in certain scenarios. - It is recommended to leave enabled when possible. - -**Default** - ``enabled`` - -**Example** - .. code-block:: text - - dwmflush = enabled - Audio ----- diff --git a/src/config.cpp b/src/config.cpp index 8d02933e..f15eacb4 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -438,7 +438,6 @@ namespace config { {}, // encoder {}, // adapter_name {}, // output_name - true // dwmflush }; audio_t audio { @@ -1034,7 +1033,6 @@ namespace config { string_f(vars, "encoder", video.encoder); string_f(vars, "adapter_name", video.adapter_name); string_f(vars, "output_name", video.output_name); - bool_f(vars, "dwmflush", video.dwmflush); path_f(vars, "pkey", nvhttp.pkey); path_f(vars, "cert", nvhttp.cert); diff --git a/src/config.h b/src/config.h index a4bac3b6..b23b59cc 100644 --- a/src/config.h +++ b/src/config.h @@ -64,7 +64,6 @@ namespace config { std::string encoder; std::string adapter_name; std::string output_name; - bool dwmflush; }; struct audio_t { diff --git a/src/platform/windows/display.h b/src/platform/windows/display.h index 316a36f7..b50acc77 100644 --- a/src/platform/windows/display.h +++ b/src/platform/windows/display.h @@ -109,7 +109,6 @@ namespace platf::dxgi { public: dup_t dup; bool has_frame {}; - bool use_dwmflush {}; std::chrono::steady_clock::time_point last_protected_content_warning_time {}; capture_e diff --git a/src/platform/windows/display_base.cpp b/src/platform/windows/display_base.cpp index 4fdf61b2..2324a8c3 100644 --- a/src/platform/windows/display_base.cpp +++ b/src/platform/windows/display_base.cpp @@ -32,10 +32,6 @@ namespace platf::dxgi { return capture_status; } - if (use_dwmflush) { - DwmFlush(); - } - auto status = dup->AcquireNextFrame(timeout.count(), &frame_info, res_p); switch (status) { @@ -470,21 +466,6 @@ namespace platf::dxgi { << "Offset : "sv << offset_x << 'x' << offset_y << std::endl << "Virtual Desktop : "sv << env_width << 'x' << env_height; - // Enable DwmFlush() only if the current refresh rate can match the client framerate. - auto refresh_rate = config.framerate; - DWM_TIMING_INFO timing_info; - timing_info.cbSize = sizeof(timing_info); - - status = DwmGetCompositionTimingInfo(NULL, &timing_info); - if (FAILED(status)) { - BOOST_LOG(warning) << "Failed to detect active refresh rate."; - } - else { - refresh_rate = std::round((double) timing_info.rateRefresh.uiNumerator / (double) timing_info.rateRefresh.uiDenominator); - } - - dup.use_dwmflush = config::video.dwmflush && !(config.framerate > refresh_rate) ? true : false; - // Bump up thread priority { const DWORD flags = TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY; diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 02ee7434..e0bb751d 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -582,18 +582,6 @@ tools\dxgi-info.exe
- -
- - -
- Improves capture latency/smoothness during mouse movement.
- Disable if you encounter any VSync-related issues. -
-