|
|
|
@ -1,5 +1,6 @@
@@ -1,5 +1,6 @@
|
|
|
|
|
use bitflags::bitflags; |
|
|
|
|
use ctru_sys::Handle; |
|
|
|
|
use crate::services::gspgpu::FramebufferFormat; |
|
|
|
|
|
|
|
|
|
pub struct Cam(()); |
|
|
|
|
|
|
|
|
@ -166,6 +167,28 @@ bitflags! {
@@ -166,6 +167,28 @@ bitflags! {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl TryFrom<FramebufferFormat> for CamOutputFormat { |
|
|
|
|
type Error = (); |
|
|
|
|
|
|
|
|
|
fn try_from(value: FramebufferFormat) -> Result<Self, Self::Error> { |
|
|
|
|
match value { |
|
|
|
|
FramebufferFormat::Rgb565 => Ok(CamOutputFormat::RGB_565), |
|
|
|
|
_ => Err(()) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl TryFrom<CamOutputFormat> for FramebufferFormat { |
|
|
|
|
type Error = (); |
|
|
|
|
|
|
|
|
|
fn try_from(value: CamOutputFormat) -> Result<Self, Self::Error> { |
|
|
|
|
match value { |
|
|
|
|
CamOutputFormat::RGB_565 => Ok(FramebufferFormat::Rgb565), |
|
|
|
|
_ => Err(()) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bitflags! { |
|
|
|
|
#[derive(Default)] |
|
|
|
|
pub struct CamShutterSoundType: u32 { |
|
|
|
|