mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
UI image selection (#97)
This commit is contained in:
@@ -40,12 +40,24 @@ pub(crate) fn get_egs_manifests(
|
||||
.filter_map(|dir| dir.ok())
|
||||
.filter_map(get_manifest_item)
|
||||
.filter(is_game_installed)
|
||||
.filter(is_game_launchable);
|
||||
let mut manifests : Vec<ManifestItem> = manifests.collect();
|
||||
manifests.sort_by_key(|m| format!("{}-{}-{}",m.install_location,m.launch_executable,m.is_managed));
|
||||
manifests.dedup_by_key(|m| format!("{}-{}-{}",m.install_location,m.launch_executable,m.is_managed));
|
||||
for mut manifest in &mut manifests{
|
||||
if settings.safe_launch.contains(&manifest.display_name) || settings.safe_launch.contains(&manifest.get_key()){
|
||||
.filter(is_game_launchable);
|
||||
let mut manifests: Vec<ManifestItem> = manifests.collect();
|
||||
manifests.sort_by_key(|m| {
|
||||
format!(
|
||||
"{}-{}-{}",
|
||||
m.install_location, m.launch_executable, m.is_managed
|
||||
)
|
||||
});
|
||||
manifests.dedup_by_key(|m| {
|
||||
format!(
|
||||
"{}-{}-{}",
|
||||
m.install_location, m.launch_executable, m.is_managed
|
||||
)
|
||||
});
|
||||
for mut manifest in &mut manifests {
|
||||
if settings.safe_launch.contains(&manifest.display_name)
|
||||
|| settings.safe_launch.contains(&manifest.get_key())
|
||||
{
|
||||
manifest.safe_launch = true;
|
||||
}
|
||||
}
|
||||
@@ -58,7 +70,6 @@ pub(crate) fn get_egs_manifests(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn get_manifest_dir_path(
|
||||
settings: &EpicGamesLauncherSettings,
|
||||
) -> Result<String, EpicGamesManifestsError> {
|
||||
@@ -113,7 +124,7 @@ fn location_from_registry() -> Option<PathBuf> {
|
||||
if let Ok(path_string) = path_string {
|
||||
let path = Path::new(&path_string).join("Manifests");
|
||||
if path.exists() {
|
||||
return Some(path.to_path_buf());
|
||||
return Some(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,7 +143,7 @@ fn guess_default_location() -> PathBuf {
|
||||
.join("EpicGamesLauncher")
|
||||
.join("Data")
|
||||
.join("Manifests");
|
||||
path.to_path_buf()
|
||||
path
|
||||
}
|
||||
|
||||
fn is_game_installed(manifest: &ManifestItem) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user