Skip to content

Commit

Permalink
Only detect game path on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
NotThorny committed Nov 25, 2023
1 parent 8687012 commit 38b2ef2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ui/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ interface IState {
notification: React.ReactElement | null
isGamePathSet: boolean
game_install_path: string
platform: string
}

export class Main extends React.Component<IProps, IState> {
Expand All @@ -64,6 +65,7 @@ export class Main extends React.Component<IProps, IState> {
notification: null,
isGamePathSet: true,
game_install_path: '',
platform: '',
}

listen('lang_error', (payload) => {
Expand Down Expand Up @@ -160,6 +162,10 @@ export class Main extends React.Component<IProps, IState> {
migotoSet: !!(await getConfigOption('migoto_path')),
})

this.setState({
platform: await invoke('get_platform'),
})

if (!cert_generated) {
// Generate the certificate
await invoke('generate_ca_files', {
Expand Down Expand Up @@ -228,7 +234,7 @@ export class Main extends React.Component<IProps, IState> {
})) 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', '')
}

Expand Down

0 comments on commit 38b2ef2

Please sign in to comment.