Browse Source

Requested changes

pull/65/head
Steve Cook 2 years ago
parent
commit
d5ce31bf3b
  1. 16
      ctru-rs/src/services/cam.rs

16
ctru-rs/src/services/cam.rs

@ -204,15 +204,8 @@ impl CamTrimmingParams {
/// equal to the end coordinates. /// equal to the end coordinates.
/// ///
/// `x_start <= x_end && y_start <= y_end` /// `x_start <= x_end && y_start <= y_end`
pub fn new( pub fn new(x_start: i16, y_start: i16, x_end: i16, y_end: i16) -> CamTrimmingParams {
x_start: i16, assert!(x_start <= x_end && y_start <= y_end);
y_start: i16,
x_end: i16,
y_end: i16,
) -> Result<CamTrimmingParams, ()> {
if x_start > x_end || y_start > y_end {
Err(())
} else {
Self { Self {
x_start, x_start,
y_start, y_start,
@ -220,16 +213,15 @@ impl CamTrimmingParams {
y_end, y_end,
} }
} }
}
} }
/// Represents data used by the camera to calibrate image quality /// Represents data used by the camera to calibrate image quality
#[derive(Default)] #[derive(Default)]
pub struct ImageQualityCalibrationData(ctru_sys::CAMU_ImageQualityCalibrationData); pub struct ImageQualityCalibrationData(pub ctru_sys::CAMU_ImageQualityCalibrationData);
/// Represents data used by the camera to calibrate image quality when using both outward cameras /// Represents data used by the camera to calibrate image quality when using both outward cameras
#[derive(Default)] #[derive(Default)]
pub struct StereoCameraCalibrationData(ctru_sys::CAMU_StereoCameraCalibrationData); pub struct StereoCameraCalibrationData(pub ctru_sys::CAMU_StereoCameraCalibrationData);
/// Represents the camera on the inside of the 3DS /// Represents the camera on the inside of the 3DS
#[non_exhaustive] #[non_exhaustive]

Loading…
Cancel
Save