platform/windows: add optional DwmFlush() call to improve Windows capture
Invoke DwmFlush() before acquiring the next frame to alleviate visual stutter during mouse movement at the cost of constraining the capture rate to the host's monitor refresh. Disabled by default; enable via "dwmflush" boolean configuration parameter.
This commit is contained in:
@@ -20,6 +20,10 @@ capture_e duplication_t::next_frame(DXGI_OUTDUPL_FRAME_INFO &frame_info, std::ch
|
||||
return capture_status;
|
||||
}
|
||||
|
||||
if(config::video.dwmflush) {
|
||||
DwmFlush();
|
||||
}
|
||||
|
||||
auto status = dup->AcquireNextFrame(timeout.count(), &frame_info, res_p);
|
||||
|
||||
switch(status) {
|
||||
|
||||
Reference in New Issue
Block a user