diff --git a/ctru-rs/examples/camera-image.rs b/ctru-rs/examples/camera-image.rs index c321919..4c49144 100644 --- a/ctru-rs/examples/camera-image.rs +++ b/ctru-rs/examples/camera-image.rs @@ -36,11 +36,9 @@ fn main() { camera .set_view_size(CamSize::CTR_TOP_LCD) .expect("Failed to set camera size"); - camera .set_output_format(CamOutputFormat::RGB_565) .expect("Failed to set camera output format"); - camera .set_noise_filter(true) .expect("Failed to enable noise filter"); @@ -50,7 +48,6 @@ fn main() { camera .set_auto_white_balance(true) .expect("Failed to enable auto white balance"); - camera .set_trimming(false) .expect("Failed to disable trimming"); diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index e564810..751ec53 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -308,7 +308,7 @@ pub trait Camera { } } - fn is_trimming(&self) -> crate::Result { + fn is_trimming_enabled(&self) -> crate::Result { unsafe { let mut trimming = false; let r = ctru_sys::CAMU_IsTrimming(&mut trimming, self.port_as_raw()); @@ -447,14 +447,14 @@ pub trait Camera { } } - fn is_auto_exposure(&self) -> crate::Result { + fn is_auto_exposure_enabled(&self) -> crate::Result { unsafe { - let mut is_auto_exposure = false; - let r = ctru_sys::CAMU_IsAutoExposure(&mut is_auto_exposure, self.camera_as_raw()); + let mut enabled = false; + let r = ctru_sys::CAMU_IsAutoExposure(&mut enabled, self.camera_as_raw()); if r < 0 { Err(r.into()) } else { - Ok(is_auto_exposure) + Ok(enabled) } } } @@ -470,15 +470,14 @@ pub trait Camera { } } - fn is_auto_white_balance(&self) -> crate::Result { + fn is_auto_white_balance_enabled(&self) -> crate::Result { unsafe { - let mut is_auto_white_balance = false; - let r = - ctru_sys::CAMU_IsAutoWhiteBalance(&mut is_auto_white_balance, self.camera_as_raw()); + let mut enabled = false; + let r = ctru_sys::CAMU_IsAutoWhiteBalance(&mut enabled, self.camera_as_raw()); if r < 0 { Err(r.into()) } else { - Ok(is_auto_white_balance) + Ok(enabled) } } }