Browse Source

Simplify icon finding

pull/4/head
AzureMarker 3 years ago
parent
commit
e79c621445
No known key found for this signature in database
GPG Key ID: 47A133F3BF9D03D3
  1. 10
      src/main.rs

10
src/main.rs

@ -141,16 +141,14 @@ fn get_metadata() -> CTRConfig {
let root_crate = metadata.root_package().expect("No root crate found"); let root_crate = metadata.root_package().expect("No root crate found");
let icon = String::from("./icon.png"); let mut icon = String::from("./icon.png");
let icon = if !Path::new(&icon).exists() { if !Path::new(&icon).exists() {
format!( icon = format!(
"{}/libctru/default_icon.png", "{}/libctru/default_icon.png",
env::var("DEVKITPRO").unwrap() env::var("DEVKITPRO").unwrap()
) )
} else { }
icon
};
CTRConfig { CTRConfig {
name: root_crate.name.clone(), name: root_crate.name.clone(),

Loading…
Cancel
Save