drop the dead code and close the gaps in the verification gate

This commit is contained in:
2026-09-21 06:35:52 +03:00
parent 4125d509cc
commit 4b850096a1
11 changed files with 13 additions and 17 deletions
+1 -3
View File
@@ -719,9 +719,7 @@ fn detect_pipe_framerate(monitor: Monitor) -> u32 {
monitor_refresh_rate(monitor)
}
/// Find the monitor containing the given screen point using the Win32 API.
/// Falls back to the primary monitor if no monitor is found.
/// Resolve the monitor containing the given screen point, falling back to the
/// Find the monitor containing the given screen point, falling back to the
/// primary monitor on failure.
fn monitor_at_point(x: i32, y: i32) -> Result<Monitor> {
use windows::Win32::Foundation::POINT;
+1 -2
View File
@@ -635,8 +635,7 @@ fn gif_shrink_factor(mode: GifBudgetMode, ratio: f64) -> f64 {
GifBudgetMode::Balanced => {
// Split the required reduction between resolution and fps so we
// reduce both proportionally rather than halving resolution alone.
let half = 0.5_f64;
(ratio * (1.0 - half) + ratio.sqrt() * half).clamp(0.1, 1.0)
(ratio * 0.5 + ratio.sqrt() * 0.5).clamp(0.1, 1.0)
}
}
}
+4 -4
View File
@@ -875,14 +875,14 @@ fn stop_capture(state: State<'_, AppState>) -> Result<RecordedClip, String> {
for ap in &ss.audio_segments {
drop(std::fs::remove_file(ap));
}
} else if video_concat != final_path {
} else {
// No audio to mux. `video_concat` is either the one segment or the
// concat output, and `final_path` is always recording.mp4, so it always
// needs moving into place.
std::fs::rename(&video_concat, &final_path)
.or_else(|_| std::fs::copy(&video_concat, &final_path).map(|_| ()))
.map_err(|e| format!("finalizing: {e:#}"))?;
drop(std::fs::remove_file(&video_concat));
} else {
// No audio and a single segment: the concat output already sits at
// final_path, so there is nothing left to move.
}
let clip = RecordedClip {