Skip to content

Commit

Permalink
Resources|Client: Improved GOG.com path detection
Browse files Browse the repository at this point in the history
IssueID #2122
  • Loading branch information
skyjake committed Nov 20, 2016
1 parent eb5ba5c commit 32fb35c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions doomsday/apps/libdoomsday/src/doomsdayapp.cpp
Expand Up @@ -505,10 +505,16 @@ QList<NativePath> DoomsdayApp::gogComPaths()
#ifdef WIN32
// Look up all the Doom GOG.com paths.
QList<QString> const subfolders({ "", "doom2", "master\\wads", "Plutonia", "TNT" });
foreach (auto gogId, QList<QString>({ "1435827232", "1435848814", "1435848742" }))
QList<QString> const gogIds ({ "1435827232", "1435848814", "1435848742" });
foreach (auto gogId, gogIds)
{
NativePath const basePath = QSettings("HKEY_LOCAL_MACHINE\\Software\\GOG.com\\Games\\" + gogId,
QSettings::NativeFormat).value("Path").toString();
NativePath basePath = QSettings("HKEY_LOCAL_MACHINE\\Software\\GOG.com\\Games\\" + gogId,
QSettings::NativeFormat).value("PATH").toString();
if (basePath.isEmpty())
{
basePath = QSettings("HKEY_LOCAL_MACHINE\\Software\\WOW6432Node\\GOG.com\\Games\\" + gogId,
QSettings::NativeFormat).value("PATH").toString();
}
if (!basePath.isEmpty())
{
foreach (auto sub, subfolders)
Expand Down

0 comments on commit 32fb35c

Please sign in to comment.