mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user