mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-01-08 12:07:45 +08:00
Lint & Prettier
This commit is contained in:
parent
f6f5eae31c
commit
989487b381
@ -115,7 +115,7 @@ async fn parse_args(inp: &Vec<String>) -> Result<Args, ArgsError> {
|
|||||||
|
|
||||||
if args.value_of("launch-game")? {
|
if args.value_of("launch-game")? {
|
||||||
let game_path = config.game_install_path;
|
let game_path = config.game_install_path;
|
||||||
let game_args: String = args.value_of("game-args").unwrap_or(String::new());
|
let game_args: String = args.value_of("game-args").unwrap_or_default();
|
||||||
|
|
||||||
if game_path.is_some() {
|
if game_path.is_some() {
|
||||||
if args.value_of("non-elevated-game")? {
|
if args.value_of("non-elevated-game")? {
|
||||||
|
@ -160,11 +160,7 @@ pub async fn patch_game(newer_game: bool, version: String) -> bool {
|
|||||||
String::from("Astrolabe.dll"),
|
String::from("Astrolabe.dll"),
|
||||||
);
|
);
|
||||||
|
|
||||||
if replaced50 {
|
return replaced50;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the patch to game files
|
// Copy the patch to game files
|
||||||
|
@ -463,8 +463,10 @@ pub fn wipe_registry(exec_name: String) {
|
|||||||
Err(e) => println!("Error wiping registry: {}", e),
|
Err(e) => println!("Error wiping registry: {}", e),
|
||||||
}
|
}
|
||||||
|
|
||||||
let hsr_settings =
|
let hsr_settings = match Hive::CurrentUser.open(
|
||||||
match Hive::CurrentUser.open(format!("Software\\Cognosphere\\Star Rail"), Security::Write) {
|
"Software\\Cognosphere\\Star Rail".to_string(),
|
||||||
|
Security::Write,
|
||||||
|
) {
|
||||||
Ok(s) => s,
|
Ok(s) => s,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
println!("Error getting registry setting: {}", e);
|
println!("Error getting registry setting: {}", e);
|
||||||
|
Loading…
Reference in New Issue
Block a user