diff --git a/backend/Cargo.lock b/backend/Cargo.lock index c56c6391..93a3b92f 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -2870,7 +2870,7 @@ dependencies = [ [[package]] name = "rai-pal" -version = "0.3.0" +version = "0.3.1" dependencies = [ "async-trait", "byteorder", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index d657953d..270a06c6 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rai-pal" -version = "0.3.0" +version = "0.3.1" authors = ["Raicuparta"] license = "GPL-3.0-or-later" repository = "https://github.com/Raicuparta/rai-pal" diff --git a/backend/src/main.rs b/backend/src/main.rs index 6c28eb65..f385d96b 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -478,135 +478,6 @@ async fn frontend_ready() -> Result { Ok(()) } -#[tauri::command] -#[specta::specta] -async fn get_other_games() -> Result>> { - let games = HashMap::from([ - ( - "Epic".to_string(), - game_scanner::epicgames::games() - .unwrap_or_default() - .iter() - .map(|game| { - format!( - "{}: {}. {} ({})", - game.id, - game.name, - if game.state.installed { - "installed" - } else { - "owned" - }, - game.path.clone().unwrap_or_default().to_string_lossy() - ) - }) - .collect(), - ), - ( - "GOG".to_string(), - game_scanner::gog::games() - .unwrap_or_default() - .iter() - .map(|game| { - format!( - "{}: {}. {} ({})", - game.id, - game.name, - if game.state.installed { - "installed" - } else { - "owned" - }, - game.path.clone().unwrap_or_default().to_string_lossy() - ) - }) - .collect(), - ), - ( - "Origin".to_string(), - game_scanner::origin::games() - .unwrap_or_default() - .iter() - .map(|game| { - format!( - "{}: {}. {} ({})", - game.id, - game.name, - if game.state.installed { - "installed" - } else { - "owned" - }, - game.path.clone().unwrap_or_default().to_string_lossy() - ) - }) - .collect(), - ), - ( - "Ubisoft".to_string(), - game_scanner::ubisoft::games() - .unwrap_or_default() - .iter() - .map(|game| { - format!( - "{}: {}. {} ({})", - game.id, - game.name, - if game.state.installed { - "installed" - } else { - "owned" - }, - game.path.clone().unwrap_or_default().to_string_lossy() - ) - }) - .collect(), - ), - ( - "Amazon".to_string(), - game_scanner::amazon::games() - .unwrap_or_default() - .iter() - .map(|game| { - format!( - "{}: {}. {} ({})", - game.id, - game.name, - if game.state.installed { - "installed" - } else { - "owned" - }, - game.path.clone().unwrap_or_default().to_string_lossy() - ) - }) - .collect(), - ), - ( - "Steam".to_string(), - game_scanner::steam::games() - .unwrap_or_default() - .iter() - .map(|game| { - format!( - "{}: {}. {} ({})", - game.id, - game.name, - if game.state.installed { - "installed" - } else { - "owned" - }, - game.path.clone().unwrap_or_default().to_string_lossy() - ) - }) - .collect(), - ), - ]); - - Ok(games) -} - #[tauri::command] #[specta::specta] async fn dummy_command() -> Result<(InstalledGame, AppEvent)> { @@ -684,7 +555,6 @@ fn main() { get_remote_mods, open_mod_loader_folder, refresh_game, - get_other_games, ] ); diff --git a/frontend/api/bindings.ts b/frontend/api/bindings.ts index 002f559b..2d566eb9 100644 --- a/frontend/api/bindings.ts +++ b/frontend/api/bindings.ts @@ -98,10 +98,6 @@ export function refreshGame(gameId: string) { return invoke()("refresh_game", { gameId }) } -export function getOtherGames() { - return invoke()<{ [key: string]: string[] }>("get_other_games") -} - export type GameEngineVersion = { major: number; minor: number; patch: number; suffix: string | null; display: string } export type GameEngineBrand = "Unity" | "Unreal" | "Godot" export type GameMode = "VR" | "Flat" diff --git a/frontend/components/settings/settings-page.tsx b/frontend/components/settings/settings-page.tsx index 8153d7f4..b8534e42 100644 --- a/frontend/components/settings/settings-page.tsx +++ b/frontend/components/settings/settings-page.tsx @@ -1,16 +1,7 @@ import { Button, Stack, Tooltip } from "@mantine/core"; import { resetLocalStorage } from "../../util/local-storage"; -import { useEffect, useState } from "react"; -import { getOtherGames } from "@api/bindings"; -import { DebugData } from "@components/debug-data"; export function SettingsPage() { - const [otherGames, setOtherGames] = useState(); - - useEffect(() => { - getOtherGames().then(setOtherGames); - }, []); - return ( - ); }