From 7dce15f553e1fe52a5c528e4e203cee99323d875 Mon Sep 17 00:00:00 2001 From: Thoronium <107363768+NotThorny@users.noreply.github.com> Date: Sat, 25 Nov 2023 14:28:06 -0700 Subject: [PATCH] Only detect game path on windows --- src/ui/Main.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/Main.tsx b/src/ui/Main.tsx index 48db0fc..64ec942 100644 --- a/src/ui/Main.tsx +++ b/src/ui/Main.tsx @@ -45,6 +45,7 @@ interface IState { notification: React.ReactElement | null isGamePathSet: boolean game_install_path: string + platform: string } export class Main extends React.Component { @@ -64,6 +65,7 @@ export class Main extends React.Component { notification: null, isGamePathSet: true, game_install_path: '', + platform: '', } listen('lang_error', (payload) => { @@ -156,6 +158,10 @@ export class Main extends React.Component { migotoSet: !!(await getConfigOption('migoto_path')), }) + this.setState({ + platform: await invoke('get_platform'), + }) + if (!cert_generated) { // Generate the certificate await invoke('generate_ca_files', { @@ -222,7 +228,7 @@ export class Main extends React.Component { })) as boolean // Set no game path so the user understands it doesn't exist there - if (!game_exists) { + if (!game_exists && this.state.platform === 'windows') { setConfigOption('game_install_path', '') }