diff --git a/include/config.h b/include/config.h index f50e433..09a4e1e 100644 --- a/include/config.h +++ b/include/config.h @@ -43,6 +43,7 @@ class Config bool bUseCache; bool bUpdateCache; bool bSaveSerials; + bool bPlatformDetection; std::string sGameRegex; std::string sDirectory; std::string sCacheDirectory; diff --git a/main.cpp b/main.cpp index 5a2d202..1896d7e 100644 --- a/main.cpp +++ b/main.cpp @@ -128,6 +128,7 @@ int main(int argc, char *argv[]) bool bNoDeb = false; bool bNoTarGz = false; bool bNoCover = false; + bool bNoPlatformDetection = false; config.bReport = false; // Commandline options (no config file) options_cli_no_cfg.add_options() @@ -148,6 +149,7 @@ int main(int argc, char *argv[]) ("report", bpo::value(&config.sReportFilePath)->implicit_value("lgogdownloader-report.log"), "Save report of downloaded/repaired files to specified file\nDefault filename: lgogdownloader-report.log") ("no-cover", bpo::value(&bNoCover)->zero_tokens()->default_value(false), "Don't download cover images. Overrides --cover option.\nUseful for making exceptions when \"cover\" is set to true in config file.") ("update-cache", bpo::value(&config.bUpdateCache)->zero_tokens()->default_value(false), "Update game details cache") + ("no-platform-detection", bpo::value(&bNoPlatformDetection)->zero_tokens()->default_value(false), "Don't try to detect supported platforms from game shelf.\nSkips the initial fast platform detection and detects the supported platforms from game details which is slower but more accurate.\nUseful in case platform identifier is missing for some games in the game shelf.\nUsing --platform with --list doesn't work with this option.") ; // Commandline options (config file) options_cli_cfg.add_options() @@ -335,6 +337,7 @@ int main(int argc, char *argv[]) config.bDLC = !bNoDLC; config.bRemoteXML = !bNoRemoteXML; config.bSubDirectories = !bNoSubDirectories; + config.bPlatformDetection = !bNoPlatformDetection; // Override cover option if (bNoCover) diff --git a/src/downloader.cpp b/src/downloader.cpp index dae67af..b96b530 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -2060,7 +2060,7 @@ std::vector Downloader::getGames() platform |= GlobalConstants::PLATFORM_MAC; // Skip if platform doesn't match - if (!(platform & config.iInstallerType)) + if (config.bPlatformDetection && !(platform & config.iInstallerType)) continue; if (!game.name.empty() && !game.id.empty())