mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-12 01:12:30 -04:00
Merge branch 'work/matts/zotac-zone' into 'master'
Add detection for ZOTAC Gaming Zone (Strix Point) and add platform configuration for both models See merge request holo/steamos-manager!4
This commit is contained in:
commit
5bf3aa7f76
3 changed files with 54 additions and 1 deletions
10
data/platforms/zotac-gaming-zone.toml
Normal file
10
data/platforms/zotac-gaming-zone.toml
Normal file
|
@ -0,0 +1,10 @@
|
|||
[performance_profile]
|
||||
platform_profile_name = "zotac_zone_platform"
|
||||
suggested_default = "custom"
|
||||
|
||||
[tdp_limit]
|
||||
method = "firmware_attribute"
|
||||
|
||||
[tdp_limit.firmware_attribute]
|
||||
attribute = "zotac_zone_platform"
|
||||
performance_profile = "custom"
|
|
@ -89,7 +89,7 @@ pub(crate) async fn device_variant() -> Result<(DeviceType, String)> {
|
|||
(DeviceType::LegionGoS, product_name.to_string())
|
||||
}
|
||||
("Valve", _, "Jupiter" | "Galileo") => (DeviceType::SteamDeck, board_name.to_string()),
|
||||
("ZOTAC", _, "G0A1W") => (DeviceType::ZotacGamingZone, board_name.to_string()),
|
||||
("ZOTAC", _, "G0A1W" | "G1A1W") => (DeviceType::ZotacGamingZone, board_name.to_string()),
|
||||
_ => (DeviceType::Unknown, String::from("unknown")),
|
||||
})
|
||||
}
|
||||
|
@ -364,6 +364,48 @@ pub mod test {
|
|||
device_variant().await.unwrap(),
|
||||
(DeviceType::Unknown, String::from("unknown"))
|
||||
);
|
||||
|
||||
write(crate::path(SYS_VENDOR_PATH), "ZOTAC\n")
|
||||
.await
|
||||
.expect("write");
|
||||
write(crate::path(BOARD_NAME_PATH), "INVALID\n")
|
||||
.await
|
||||
.expect("write");
|
||||
write(crate::path(PRODUCT_NAME_PATH), "INVALID\n")
|
||||
.await
|
||||
.expect("write");
|
||||
assert_eq!(
|
||||
steam_deck_variant().await.unwrap(),
|
||||
SteamDeckVariant::Unknown
|
||||
);
|
||||
assert_eq!(
|
||||
device_variant().await.unwrap(),
|
||||
(DeviceType::Unknown, String::from("unknown"))
|
||||
);
|
||||
|
||||
write(crate::path(BOARD_NAME_PATH), "G0A1W\n")
|
||||
.await
|
||||
.expect("write");
|
||||
assert_eq!(
|
||||
steam_deck_variant().await.unwrap(),
|
||||
SteamDeckVariant::Unknown
|
||||
);
|
||||
assert_eq!(
|
||||
device_variant().await.unwrap(),
|
||||
(DeviceType::ZotacGamingZone, String::from("G0A1W"))
|
||||
);
|
||||
|
||||
write(crate::path(BOARD_NAME_PATH), "G1A1W\n")
|
||||
.await
|
||||
.expect("write");
|
||||
assert_eq!(
|
||||
steam_deck_variant().await.unwrap(),
|
||||
SteamDeckVariant::Unknown
|
||||
);
|
||||
assert_eq!(
|
||||
device_variant().await.unwrap(),
|
||||
(DeviceType::ZotacGamingZone, String::from("G1A1W"))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -169,6 +169,7 @@ impl PlatformConfig {
|
|||
DeviceType::LegionGoS => "legion-go-series",
|
||||
DeviceType::RogAlly => "rog-ally-series",
|
||||
DeviceType::RogAllyX => "rog-ally-series",
|
||||
DeviceType::ZotacGamingZone => "zotac-gaming-zone",
|
||||
_ => return Ok(None),
|
||||
};
|
||||
let config = read_to_string(format!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue