aboutsummaryrefslogtreecommitdiff
path: root/libs/nak/src/game_finder/heroic.rs
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-20 23:53:26 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-20 23:53:26 -0600
commitd22d8c267b012729b6b84142def2a30ca4691d7a (patch)
tree4d04382b6c9a44fa72ade906e0bf51e8f97855a8 /libs/nak/src/game_finder/heroic.rs
parent5467e210668eb24de9a4429ef0ddcbc6442e8932 (diff)
Fix AppImage plugin loading, save timestamps, and INI corruption
- Add AppConfig::pluginsPath()/dllsPath() that respect MO2_PLUGINS_DIR and MO2_DLLS_DIR env vars, fixing plugin discovery when plugins live inside read-only AppImage squashfs (#22, game plugin not found errors) - Preserve file modification times in save deploy/sync so games display correct save timestamps instead of all showing the same time (#17) - Replace QSettings INI reader in saves tab with direct line-by-line parser to avoid backslash-as-line-continuation corruption of sLocalSavePath=__MO_Saves\ (#22, saves tab showing wrong directory) - Add diagnostic logging to plugin symlink creation, save backup/restore operations to help diagnose silent failures through prefix symlinks - Fix Python SONAME mismatch in AppImage build (patch portable Python SONAME to match librunner.so DT_NEEDED, preventing dual libpython load) - Bundle PyQt6 Qt dependencies, improve RPATH for lib/ and plugins/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/nak/src/game_finder/heroic.rs')
-rw-r--r--libs/nak/src/game_finder/heroic.rs23
1 files changed, 14 insertions, 9 deletions
diff --git a/libs/nak/src/game_finder/heroic.rs b/libs/nak/src/game_finder/heroic.rs
index 7bdda09..e80c1e1 100644
--- a/libs/nak/src/game_finder/heroic.rs
+++ b/libs/nak/src/game_finder/heroic.rs
@@ -8,7 +8,7 @@ use std::path::{Path, PathBuf};
use serde::Deserialize;
-use super::known_games::find_by_gog_id;
+use super::known_games::{find_by_epic_id, find_by_gog_id, find_by_title};
use super::{Game, HeroicStore, Launcher};
use crate::logging::{log_info, log_warning};
@@ -202,11 +202,16 @@ fn detect_epic_games(heroic_path: &Path) -> Vec<Game> {
}
// Get title
- let name = game_obj
+ let title = game_obj
.get("title")
.and_then(|v| v.as_str())
- .unwrap_or(app_name)
- .to_string();
+ .unwrap_or(app_name);
+
+ // Look up known game info: try Epic AppName first, then title match
+ let known_game = find_by_epic_id(app_name)
+ .or_else(|| find_by_title(title));
+
+ let name = title.to_string();
// Get Wine prefix
let prefix_path = get_heroic_game_prefix(heroic_path, app_name);
@@ -219,11 +224,11 @@ fn detect_epic_games(heroic_path: &Path) -> Vec<Game> {
launcher: Launcher::Heroic {
store: HeroicStore::Epic,
},
- my_games_folder: None,
- appdata_local_folder: None,
- appdata_roaming_folder: None,
- registry_path: None,
- registry_value: None,
+ my_games_folder: known_game.and_then(|g| g.my_games_folder.map(String::from)),
+ appdata_local_folder: known_game.and_then(|g| g.appdata_local_folder.map(String::from)),
+ appdata_roaming_folder: known_game.and_then(|g| g.appdata_roaming_folder.map(String::from)),
+ registry_path: known_game.map(|g| g.registry_path.to_string()),
+ registry_value: known_game.map(|g| g.registry_value.to_string()),
});
}
}