diff --git a/src/capturer/mod.rs b/src/capturer/mod.rs index 04a189b..d065f2b 100644 --- a/src/capturer/mod.rs +++ b/src/capturer/mod.rs @@ -20,6 +20,7 @@ pub enum Resolution { _1440p, _2160p, _4320p, + Custom {width: u32}, #[default] Captured, @@ -34,6 +35,9 @@ impl Resolution { Resolution::_1440p => [2560, (2560_f32 / aspect_ratio).floor() as u32], Resolution::_2160p => [3840, (3840_f32 / aspect_ratio).floor() as u32], Resolution::_4320p => [7680, (7680_f32 / aspect_ratio).floor() as u32], + Resolution::Custom { width } => { + [width, (width / aspect_ratio).floor() as u32] + } Resolution::Captured => { panic!(".value should not be called when Resolution type is Captured") }