Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Update resolution_limits.rs

Richie McIlroy6ef923080c86
diff --git a/crates/recording/src/resolution_limits.rs b/crates/recording/src/resolution_limits.rs
index c052de2a2..33af77c07 100644
--- a/crates/recording/src/resolution_limits.rs
+++ b/crates/recording/src/resolution_limits.rs
@@ -8,7 +8,7 @@ pub fn calculate_gpu_compatible_size(
max_dimension: u32,
) -> Option<(u32, u32)> {
let needs_downscale = width > max_dimension || height > max_dimension;
- let needs_even_adjustment = width % 2 != 0 || height % 2 != 0;
+ let needs_even_adjustment = !width.is_multiple_of(2) || !height.is_multiple_of(2);
if !needs_downscale && !needs_even_adjustment {
return None;