nashaofu / xcap

XCap is a cross-platform screen capture library written in Rust. It supports Linux (X11, Wayland), MacOS, and Windows. XCap supports screenshot and video recording (to be implemented).
https://docs.rs/xcap
Apache License 2.0
459 stars 55 forks source link

Frame out of date when capturing games on Windows #131

Open mikey0000 opened 4 months ago

mikey0000 commented 4 months ago

frame does not update when capturing windows that are games.

Way round this is to take the whole monitor and grab the window rect off the monitor. Not sure if there is a better way.

e.g

 let dw_hwnd = GetDesktopWindow();
 let box_hdc_desktop_window: BoxHDC = BoxHDC::from(dw_hwnd);

basically similar to the capture desktop but can set the width and height. This would be a nice feature to be able to capture part of the monitor instead of window.