click highlights via global mouse hook + ffmpeg drawbox
This commit is contained in:
@@ -142,6 +142,17 @@ pub struct CaptureSession {
|
||||
control: CaptureControl<CaptureHandler, anyhow::Error>,
|
||||
}
|
||||
|
||||
pub fn primary_monitor_dims() -> Result<(u32, u32)> {
|
||||
let monitor = Monitor::primary().map_err(|e| anyhow!("primary monitor: {e:?}"))?;
|
||||
let w = monitor
|
||||
.width()
|
||||
.map_err(|e| anyhow!("monitor width: {e:?}"))?;
|
||||
let h = monitor
|
||||
.height()
|
||||
.map_err(|e| anyhow!("monitor height: {e:?}"))?;
|
||||
Ok((w & !1, h & !1))
|
||||
}
|
||||
|
||||
pub fn start(
|
||||
output_path: PathBuf,
|
||||
ffmpeg_path: PathBuf,
|
||||
|
||||
Reference in New Issue
Block a user