Commit cb02aa6c authored by Evan Ramos's avatar Evan Ramos

Duke3D, SW, NAM: Add detection of GOG Galaxy install paths

parent f7da5bfe
......@@ -639,6 +639,8 @@ void G_AddSearchPaths(void)
// Duke Nukem 3D: Atomic Edition - GOG.com
Bsnprintf(buf, sizeof(buf), "%s/Duke Nukem 3D.app/Contents/Resources/Duke Nukem 3D.boxer/C.harddisk", applications[i]);
addsearchpath_user(buf, SEARCHPATH_REMOVE);
Bsnprintf(buf, sizeof(buf), "%s/Duke Nukem 3D.app/Contents/Resources/game/Duke Nukem 3D.app/Contents/Resources/Duke Nukem 3D.boxer/C.harddisk", applications[i]);
addsearchpath_user(buf, SEARCHPATH_REMOVE);
// Duke Nukem 3D: Atomic Edition - ZOOM Platform
Bsnprintf(buf, sizeof(buf), "%s/Duke Nukem 3D - Atomic Edition.app/Contents/MacOS/Duke3D - Atomic Edition", applications[i]);
......@@ -647,6 +649,8 @@ void G_AddSearchPaths(void)
// NAM - GOG.com
Bsnprintf(buf, sizeof(buf), "%s/NAM.app/Contents/Resources/game", applications[i]);
addsearchpath_user(buf, SEARCHPATH_NAM);
Bsnprintf(buf, sizeof(buf), "%s/NAM.app/Contents/Resources/game/NAM.app/Contents/Resources/game", applications[i]);
addsearchpath_user(buf, SEARCHPATH_NAM);
Bsnprintf(buf, sizeof(buf), "%s/NAM.app/Contents/Resources/game", documents[i]);
addsearchpath_user(buf, SEARCHPATH_NAM);
}
......@@ -706,6 +710,11 @@ void G_AddSearchPaths(void)
// Duke Nukem 3D: Atomic Edition - GOG.com
bufsize = sizeof(buf);
if (Paths_ReadRegistryValue(R"(SOFTWARE\GOG.com\Games\1207658730)", "path", buf, &bufsize))
{
addsearchpath_user(buf, SEARCHPATH_REMOVE);
}
bufsize = sizeof(buf);
if (Paths_ReadRegistryValue("SOFTWARE\\GOG.com\\GOGDUKE3D", "PATH", buf, &bufsize))
{
addsearchpath_user(buf, SEARCHPATH_REMOVE);
......
......@@ -195,12 +195,20 @@ static void SW_AddSearchPaths()
Paths_ParseSteamLibraryVDF(buf, SW_AddSteamPaths);
// Shadow Warrior Classic Complete - GOG.com
Bsnprintf(buf, sizeof(buf), "%s/Shadow Warrior.app/Contents/Resources/Shadow Warrior.boxer/C swarrior_files.harddisk", applications[i]);
SW_Add_GOG_SWCC(buf);
Bsnprintf(buf, sizeof(buf), "%s/Shadow Warrior Complete/Shadow Warrior.app/Contents/Resources/Shadow Warrior.boxer/C swarrior_files.harddisk", applications[i]);
SW_Add_GOG_SWCC(buf);
Bsnprintf(buf, sizeof(buf), "%s/Shadow Warrior Complete.app/Contents/Resources/game/Shadow Warrior.app/Contents/Resources/Shadow Warrior.boxer/C swarrior_files.harddisk", applications[i]);
SW_Add_GOG_SWCC(buf);
// Shadow Warrior Classic Redux - GOG.com
Bsnprintf(buf, sizeof(buf), "%s/Shadow Warrior Classic Redux.app/Contents/Resources/gameroot", applications[i]);
SW_Add_GOG_SWCR(buf);
Bsnprintf(buf, sizeof(buf), "%s/Shadow Warrior Classic Redux/Shadow Warrior Classic Redux.app/Contents/Resources/gameroot", applications[i]);
SW_Add_GOG_SWCR(buf);
Bsnprintf(buf, sizeof(buf), "%s/Shadow Warrior Classic Redux.app/Contents/Resources/game/Shadow Warrior Classic Redux.app/Contents/Resources/gameroot", applications[i]);
SW_Add_GOG_SWCR(buf);
}
for (i = 0; i < 2; i++)
......@@ -260,6 +268,12 @@ static void SW_AddSearchPaths()
// Shadow Warrior Classic Complete - GOG.com
bufsize = sizeof(buf);
if (Paths_ReadRegistryValue(R"(SOFTWARE\GOG.com\Games\1207659142)", "PATH", buf, &bufsize))
{
if (SW_Add_GOG_SWCC(buf) == 0)
return;
}
bufsize = sizeof(buf);
if (Paths_ReadRegistryValue("SOFTWARE\\GOG.com\\GOGSHADOWARRIOR", "PATH", buf, &bufsize))
{
if (SW_Add_GOG_SWCC(buf) == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment