mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2024-11-26 21:30:47 +00:00
Fix launch args setting
This commit is contained in:
parent
6d53f344ac
commit
5db28756d2
@ -28,6 +28,8 @@ pub struct Configuration {
|
||||
pub auto_mongodb: Option<bool>,
|
||||
pub un_elevated: Option<bool>,
|
||||
pub redirect_more: Option<bool>,
|
||||
pub launch_args: Option<String>,
|
||||
pub offline_mode: Option<bool>,
|
||||
}
|
||||
|
||||
pub fn config_path() -> PathBuf {
|
||||
|
@ -217,10 +217,19 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
|
||||
args: config.launch_args,
|
||||
})
|
||||
} else {
|
||||
await invoke('run_program_relative', {
|
||||
path: exe || config.game_install_path,
|
||||
args: config.launch_args,
|
||||
})
|
||||
if (config.launch_args.length < 1) {
|
||||
// Run relative when there are no args
|
||||
await invoke('run_program_relative', {
|
||||
path: exe || config.game_install_path,
|
||||
args: config.launch_args,
|
||||
})
|
||||
} else {
|
||||
// Run directly when there are args
|
||||
await invoke('run_program', {
|
||||
path: exe || config.game_install_path,
|
||||
args: config.launch_args,
|
||||
})
|
||||
}
|
||||
}
|
||||
else alert('Game not found! At: ' + (exe || config.game_install_path))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user