mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-01-08 12:07:45 +08: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 auto_mongodb: Option<bool>,
|
||||||
pub un_elevated: Option<bool>,
|
pub un_elevated: Option<bool>,
|
||||||
pub redirect_more: Option<bool>,
|
pub redirect_more: Option<bool>,
|
||||||
|
pub launch_args: Option<String>,
|
||||||
|
pub offline_mode: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn config_path() -> PathBuf {
|
pub fn config_path() -> PathBuf {
|
||||||
|
@ -217,10 +217,19 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
|
|||||||
args: config.launch_args,
|
args: config.launch_args,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
await invoke('run_program_relative', {
|
if (config.launch_args.length < 1) {
|
||||||
path: exe || config.game_install_path,
|
// Run relative when there are no args
|
||||||
args: config.launch_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))
|
else alert('Game not found! At: ' + (exe || config.game_install_path))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user