popn: distinguish between hpm and new popn (#619)

## Link to GitHub Issue or related Pull Request, if one exists
#618

## Description of change
Enhance game detection logic.

Fix heap size.
This commit is contained in:
bicarus
2026-04-09 19:54:27 -07:00
committed by GitHub
parent 7b4227d2a9
commit ca70f7b19c
6 changed files with 88 additions and 56 deletions
+17 -7
View File
@@ -114,13 +114,23 @@ namespace overlay::windows {
if (cfg::CONFIGURATOR_STANDALONE) {
const auto file_hints = games::get_game_file_hints(game_name);
if (file_hints) {
for (auto &file_hint : *file_hints) {
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("contents") / file_hint) ||
fileutils::file_exists(MODULE_PATH / file_hint))
{
for (auto &file_hint_list : *file_hints) {
bool matches_all_files = true;
for (auto &file_hint : file_hint_list) {
const auto matched =
(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("contents") / file_hint) ||
fileutils::file_exists(MODULE_PATH / file_hint));
if (!matched) {
matches_all_files = false;
break;
}
}
if (matches_all_files) {
this->games_selected = games_list.size() - 1;
this->games_selected_name = game_name;
eamuse_set_game(game_name);