Browse Source

Renamed SystemModel enum variants

pull/118/head
Andrea Ciliberti 2 years ago
parent
commit
31ad7cbf8e
  1. 24
      ctru-rs/src/services/cfgu.rs

24
ctru-rs/src/services/cfgu.rs

@ -36,12 +36,12 @@ pub enum Language {
#[derive(Copy, Clone, Debug, PartialEq, Eq)] #[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[repr(u32)] #[repr(u32)]
pub enum SystemModel { pub enum SystemModel {
Model3DS = ctru_sys::CFG_MODEL_3DS, N3DS = ctru_sys::CFG_MODEL_3DS,
Model3DSXL = ctru_sys::CFG_MODEL_3DSXL, N3DSXL = ctru_sys::CFG_MODEL_3DSXL,
ModelNew3DS = ctru_sys::CFG_MODEL_N3DS, NewN3DS = ctru_sys::CFG_MODEL_N3DS,
Model2DS = ctru_sys::CFG_MODEL_2DS, N2DS = ctru_sys::CFG_MODEL_2DS,
ModelNew3DSXL = ctru_sys::CFG_MODEL_N3DSXL, NewN3DSXL = ctru_sys::CFG_MODEL_N3DSXL,
ModelNew2DSXL = ctru_sys::CFG_MODEL_N2DSXL, NewN2DSXL = ctru_sys::CFG_MODEL_N2DSXL,
} }
/// Represents the configuration service. No actions can be performed /// Represents the configuration service. No actions can be performed
@ -163,12 +163,12 @@ impl TryFrom<u8> for SystemModel {
fn try_from(value: u8) -> Result<Self, Self::Error> { fn try_from(value: u8) -> Result<Self, Self::Error> {
match value as u32 { match value as u32 {
ctru_sys::CFG_MODEL_3DS => Ok(SystemModel::Model3DS), ctru_sys::CFG_MODEL_3DS => Ok(SystemModel::N3DS),
ctru_sys::CFG_MODEL_3DSXL => Ok(SystemModel::Model3DSXL), ctru_sys::CFG_MODEL_3DSXL => Ok(SystemModel::N3DSXL),
ctru_sys::CFG_MODEL_N3DS => Ok(SystemModel::ModelNew3DS), ctru_sys::CFG_MODEL_N3DS => Ok(SystemModel::NewN3DS),
ctru_sys::CFG_MODEL_2DS => Ok(SystemModel::Model2DS), ctru_sys::CFG_MODEL_2DS => Ok(SystemModel::N2DS),
ctru_sys::CFG_MODEL_N3DSXL => Ok(SystemModel::ModelNew3DSXL), ctru_sys::CFG_MODEL_N3DSXL => Ok(SystemModel::NewN3DSXL),
ctru_sys::CFG_MODEL_N2DSXL => Ok(SystemModel::ModelNew2DSXL), ctru_sys::CFG_MODEL_N2DSXL => Ok(SystemModel::NewN2DSXL),
_ => Err(()), _ => Err(()),
} }
} }

Loading…
Cancel
Save