diff --git a/components/files/windowspath.cpp b/components/files/windowspath.cpp index b6b5001774..b0054b18eb 100644 --- a/components/files/windowspath.cpp +++ b/components/files/windowspath.cpp @@ -2,6 +2,7 @@ #if defined(_WIN32) || defined(__WINDOWS__) +#include #include #include @@ -141,12 +142,20 @@ namespace Files if (!disk.empty() && std::filesystem::is_directory(disk)) paths.emplace_back(std::move(disk)); } + { + std::filesystem::path gog = getRegistryPath(L"SOFTWARE\\GOG.com\\Games\\1435828767", L"path", true); + if (!gog.empty() && std::filesystem::is_directory(gog)) + paths.emplace_back(std::move(gog)); + } { std::filesystem::path steam = getRegistryPath( L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App 22320", L"InstallLocation", false); if (!steam.empty() && std::filesystem::is_directory(steam)) paths.emplace_back(std::move(steam)); } + std::ranges::sort(paths); + const auto [first, last] = std::ranges::unique(paths); + paths.erase(first, last); return paths; }