|
|
@ -204,32 +204,24 @@ 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, |
|
|
|
Self { |
|
|
|
x_end: i16, |
|
|
|
x_start, |
|
|
|
y_end: i16, |
|
|
|
y_start, |
|
|
|
) -> Result<CamTrimmingParams, ()> { |
|
|
|
x_end, |
|
|
|
if x_start > x_end || y_start > y_end { |
|
|
|
y_end, |
|
|
|
Err(()) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Self { |
|
|
|
|
|
|
|
x_start, |
|
|
|
|
|
|
|
y_start, |
|
|
|
|
|
|
|
x_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] |
|
|
|