cfg: fix early game detection for Polaris Chord and MFG (#551)

## Link to GitHub Issue, if one exists


## Description of change
Some parts of the UI (e.g., Card tab) rely on early auto detection of
the game, which relies on file hints and not the game code. Two games
(PC and MFG) rely on directory presence and not file presence.
This commit is contained in:
bicarus
2026-02-04 11:40:07 -08:00
committed by GitHub
parent f5a3caf536
commit 38d9939eb7
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ namespace games {
buttons_help.insert({ pc, pc::get_buttons_help() }); buttons_help.insert({ pc, pc::get_buttons_help() });
analogs.insert({ pc, pc::get_analogs() }); analogs.insert({ pc, pc::get_analogs() });
lights.insert({ pc, pc::get_lights() }); lights.insert({ pc, pc::get_lights() });
file_hints[pc].emplace_back("game/svm_Data"); file_hints[pc].emplace_back("game/svm.exe");
} }
const std::vector<std::string> &get_games() { const std::vector<std::string> &get_games() {
+1 -1
View File
@@ -1879,7 +1879,7 @@ int main_implementation(int argc, char *argv[]) {
} }
// Polaris Chord // Polaris Chord
if (check_dll("kamunity.dll") && fileutils::dir_exists("game/svm_Data")) { if (check_dll("kamunity.dll") && fileutils::file_exists("game/svm.exe")) {
avs::game::DLL_NAME = "kamunity.dll"; avs::game::DLL_NAME = "kamunity.dll";
attach_io = true; attach_io = true;
attach_pc = true; attach_pc = true;
+3 -1
View File
@@ -89,10 +89,11 @@ namespace overlay::windows {
// standalone configurator should look for file hints // standalone configurator should look for file hints
if (cfg::CONFIGURATOR_STANDALONE) { if (cfg::CONFIGURATOR_STANDALONE) {
auto file_hints = games::get_game_file_hints(game_name); const auto file_hints = games::get_game_file_hints(game_name);
if (file_hints) { if (file_hints) {
for (auto &file_hint : *file_hints) { for (auto &file_hint : *file_hints) {
if (fileutils::file_exists(file_hint) || if (fileutils::file_exists(file_hint) ||
fileutils::dir_exists(file_hint) ||
fileutils::file_exists(std::filesystem::path("modules") / file_hint) || fileutils::file_exists(std::filesystem::path("modules") / file_hint) ||
fileutils::file_exists(std::filesystem::path("contents") / file_hint) || fileutils::file_exists(std::filesystem::path("contents") / file_hint) ||
fileutils::file_exists(MODULE_PATH / file_hint)) fileutils::file_exists(MODULE_PATH / file_hint))
@@ -100,6 +101,7 @@ namespace overlay::windows {
this->games_selected = games_list.size() - 1; this->games_selected = games_list.size() - 1;
this->games_selected_name = game_name; this->games_selected_name = game_name;
eamuse_set_game(game_name); eamuse_set_game(game_name);
break;
} }
} }
} }