From 4e5c45a778d045c3b653043fc495f03ef1a9b2eb Mon Sep 17 00:00:00 2001 From: gefydev Date: Sun, 22 Nov 2026 18:34:42 -0300 Subject: [PATCH] Config: the Series S title memory for every Series S spelling is_series_s() takes "lockhart" and "series s", and decides the device type, the OEM ConsoleMode and the texture layout. resolve() and title_memory_budget_mb() compared device_type with "lockhart" only, so device_type = "series s" gave a Series S with the Series X budget (13 824 MB) and the manifest's XboxAnacondaTitleMemory. Both use is_series_s() now. --- crates/xcl/src/config.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/crates/xcl/src/config.rs b/crates/xcl/src/config.rs index 23257c0..4b45d72 100644 --- a/crates/xcl/src/config.rs +++ b/crates/xcl/src/config.rs @@ -74,7 +74,7 @@ impl Config { /// setting has a concrete value. Returns what came from the manifest (for the log). pub fn resolve(&mut self, manifest: Option<&crate::manifest::Manifest>) -> Vec { let mut from = Vec::new(); - let series_s = self.device_type.eq_ignore_ascii_case("lockhart"); + let series_s = self.is_series_s(); if self.title_memory == "auto" { let m = manifest.and_then(|m| if series_s { m.lockhart_memory.clone() } else { m.anaconda_memory.clone() }); if let Some(m) = &m { @@ -109,7 +109,7 @@ impl Config { /// TitleMemoryStatus budget (MiB): `title_memory_mb`, 0 = the device's standard budget. pub fn title_memory_budget_mb(&self) -> u64 { match self.title_memory_mb { - 0 if self.device_type.eq_ignore_ascii_case("lockhart") => 8_192, + 0 if self.is_series_s() => 8_192, 0 => 13_824, v => v, } @@ -292,6 +292,23 @@ mod tests { assert_eq!(c.pls_drive(), None); } + #[test] + fn every_series_s_spelling_gets_the_series_s_memory() { + let manifest = crate::manifest::Manifest { + anaconda_memory: Some("Standard".into()), + lockhart_memory: Some("Advanced".into()), + ..Default::default() + }; + for device in ["lockhart", "Series S"] { + let mut c = Config { device_type: device.into(), ..Config::default() }; + c.resolve(Some(&manifest)); + assert_eq!((c.title_memory.as_str(), c.title_memory_mb), ("advanced", 8_192), "{device}"); + } + let mut c = Config::default(); + c.resolve(Some(&manifest)); + assert_eq!((c.title_memory.as_str(), c.title_memory_mb), ("standard", 13_824)); + } + #[test] fn raytracing_tier_parsing() { assert_eq!(parse_raytracing_tier("auto"), None);