mirror of
https://github.com/ivall/xcl.git
synced 2026-11-24 05:14:57 +01:00
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.
This commit is contained in:
@@ -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<String> {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user