mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-13 09:52:00 -04:00
hardware: Detect ROG Ally and ROG Ally X
This commit is contained in:
parent
9dc61ee252
commit
3e1ab5a2c0
1 changed files with 4 additions and 0 deletions
|
@ -38,6 +38,8 @@ pub(crate) enum DeviceType {
|
||||||
SteamDeck,
|
SteamDeck,
|
||||||
LegionGo,
|
LegionGo,
|
||||||
LegionGoS,
|
LegionGoS,
|
||||||
|
RogAlly,
|
||||||
|
RogAllyX,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Display, EnumString, PartialEq, Debug, Copy, Clone, TryFromPrimitive)]
|
#[derive(Display, EnumString, PartialEq, Debug, Copy, Clone, TryFromPrimitive)]
|
||||||
|
@ -79,6 +81,8 @@ pub(crate) async fn device_variant() -> Result<(DeviceType, String)> {
|
||||||
let board_name = fs::read_to_string(path(BOARD_NAME_PATH)).await?;
|
let board_name = fs::read_to_string(path(BOARD_NAME_PATH)).await?;
|
||||||
let board_name = board_name.trim_end();
|
let board_name = board_name.trim_end();
|
||||||
Ok(match (sys_vendor.trim_end(), product_name, board_name) {
|
Ok(match (sys_vendor.trim_end(), product_name, board_name) {
|
||||||
|
("ASUSTeK COMPUTER INC.", _, "RC71L") => (DeviceType::RogAlly, board_name.to_string()),
|
||||||
|
("ASUSTeK COMPUTER INC.", _, "RC72LA") => (DeviceType::RogAllyX, board_name.to_string()),
|
||||||
("LENOVO", "83E1", _) => (DeviceType::LegionGo, product_name.to_string()),
|
("LENOVO", "83E1", _) => (DeviceType::LegionGo, product_name.to_string()),
|
||||||
("LENOVO", "83L3" | "83N6" | "83Q2" | "83Q3", _) => {
|
("LENOVO", "83L3" | "83N6" | "83Q2" | "83Q3", _) => {
|
||||||
(DeviceType::LegionGoS, product_name.to_string())
|
(DeviceType::LegionGoS, product_name.to_string())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue