Skip to content

Commit f7787c7

Browse files
committed
Rename Game Pass to Xbox and update related references
Update Xbox platform to reference xbox_games.ps1 instead of game_pass_games.ps1 Fix typo in XboxPlatform struct and its references
1 parent a83f0e7 commit f7787c7

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ BoilR can import games from many platforms, but there are limits based
7676
| [Bottles](https://usebottles.com/) | No | Yes | Yes |
7777
| [MiniGalaxy](https://sharkwouter.github.io/minigalaxy/) | No | Yes | Yes |
7878
| [Playnite](https://playnite.link/) | Yes | No | No |
79-
| [Game Pass](https://www.xbox.com/en-US/xbox-game-pass) | Yes | No | No |
79+
| [Xbox](https://www.xbox.com/en-US/) | Yes | No | No |
8080

8181
## Getting cover art for your shortcuts
8282

src/platforms/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mod amazon;
1818
mod playnite;
1919

2020
#[cfg(not(target_family = "unix"))]
21-
mod gamepass;
21+
mod xbox;
2222

2323

2424

src/platforms/platforms_load.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const PLATFORM_NAMES: [&str; 14] = [
1818
"uplay",
1919
"minigalaxy",
2020
"playnite",
21-
"gamepass"
21+
"xbox"
2222
];
2323

2424
pub type Platforms = Vec<Box<dyn GamesPlatform>>;
@@ -35,11 +35,11 @@ pub fn load_platform<A: AsRef<str>, B: AsRef<str>>(
3535
//Windows only platforms
3636
use super::amazon::AmazonPlatform;
3737
use super::playnite::PlaynitePlatform;
38-
use super::gamepass::GamePassPlatForm;
38+
use super::xbox::XboxPlatform;
3939
match name {
4040
"amazon" => return load::<AmazonPlatform>(s),
4141
"playnite" => return load::<PlaynitePlatform>(s),
42-
"gamepass" => return load::<GamePassPlatForm>(s),
42+
"xbox" => return load::<XboxPlatform>(s),
4343
_ => {}
4444
}
4545
}
File renamed without changes.

src/platforms/gamepass/platform.rs src/platforms/xbox/platform.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@ use steam_shortcuts_util::Shortcut;
1010
use crate::platforms::ShortcutToImport;
1111

1212
#[derive(Clone, Deserialize, Default)]
13-
pub struct GamePassPlatForm {
14-
settings: GamePassSettings,
13+
pub struct XboxPlatform {
14+
settings: XboxSettings,
1515
}
1616

1717
#[derive(Serialize, Deserialize, Default, Clone)]
18-
pub struct GamePassSettings {
18+
pub struct XboxSettings {
1919
enabled: bool,
2020
}
2121

22-
impl GamesPlatform for GamePassPlatForm {
22+
impl GamesPlatform for XboxPlatform {
2323
fn name(&self) -> &str {
24-
"Game Pass"
24+
"Xbox"
2525
}
2626

2727
fn code_name(&self) -> &str {
28-
"gamepass"
28+
"xbox"
2929
}
3030

3131
fn enabled(&self) -> bool {
3232
self.settings.enabled
3333
}
3434

3535
fn get_shortcut_info(&self) -> eyre::Result<Vec<crate::platforms::ShortcutToImport>> {
36-
let command = include_str!("./game_pass_games.ps1");
36+
let command = include_str!("./xbox_games.ps1");
3737
let res = run_powershell_command(command)?;
3838
let apps: Vec<AppInfo> = serde_json::from_str(&res)?;
3939
let windows_dir = std::env::var("WinDir").unwrap_or("C:\\Windows".to_string());
@@ -82,8 +82,8 @@ impl GamesPlatform for GamePassPlatForm {
8282
}
8383

8484
fn render_ui(&mut self, ui: &mut egui::Ui) {
85-
ui.heading("Game Pass");
86-
ui.checkbox(&mut self.settings.enabled, "Import from Game Pass");
85+
ui.heading("Xbox");
86+
ui.checkbox(&mut self.settings.enabled, "Import from Xbox");
8787
}
8888
}
8989

@@ -181,9 +181,9 @@ fn run_powershell_command(cmd: &str) -> Result<String, Error> {
181181
}
182182
}
183183

184-
impl FromSettingsString for GamePassPlatForm {
184+
impl FromSettingsString for XboxPlatform {
185185
fn from_settings_string<S: AsRef<str>>(s: S) -> Self {
186-
GamePassPlatForm {
186+
XboxPlatform {
187187
settings: load_settings(s),
188188
}
189189
}
File renamed without changes.

0 commit comments

Comments
 (0)