click highlights via global mouse hook + ffmpeg drawbox

This commit is contained in:
2026-05-12 01:47:45 +03:00
parent 181606156f
commit b7ac517381
6 changed files with 224 additions and 5 deletions
+11
View File
@@ -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,