Skip to content

Commit

Permalink
fix compilation error on non-windows targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ethangreen-dev committed Jan 3, 2024
1 parent a6d0a47 commit 135a3af
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/tcli/src/game/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ use serde::{Deserialize, Serialize};

use super::{ecosystem, steam};
use crate::error::Error;
use crate::game::win;
use crate::project::ProjectPath;
use crate::ts::v1::models::ecosystem::{GameDef, GameDefPlatform};
use crate::util::os::OS;

#[cfg(windows)]
use crate::game::win;

#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub struct GameData {
pub ecosystem_label: String,
Expand Down Expand Up @@ -89,21 +91,21 @@ impl GameImportBuilder {
win::gamepass::get_game_path(identifier).map(|x| (dist, x))
}
#[cfg(target_os = "linux")]
GameDefPlatform::GamePass { _identifier } => None,
GameDefPlatform::GamePass { identifier: _ } => None,

#[cfg(windows)]
GameDefPlatform::Origin { identifier } => {
win::eadesktop::get_game_path(identifier).map(|x| (dist, x))
}
#[cfg(target_os = "linux")]
GameDefPlatform::Origin { _identifier } => None,
GameDefPlatform::Origin { identifier: _ } => None,

#[cfg(windows)]
GameDefPlatform::EpicGames { identifier } => {
win::egs::get_game_path(identifier).map(|x| (dist, x))
}
#[cfg(target_os = "linux")]
GameDefPlatform::EpicGames { _identifier } => None,
GameDefPlatform::EpicGames { identifier: _ } => None,

_ => None,
})
Expand Down

0 comments on commit 135a3af

Please sign in to comment.