Skip to content

Commit 2ea9a00

Browse files
committed
Fixed the number of hardcoded game locations since it is different per-game.
1 parent d53332c commit 2ea9a00

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

TheForceEngine/TFE_Settings/gameSourceData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ namespace TFE_Settings
101101
"D:/Program Files (x86)/GOG.com/outlaws/",
102102
"D:/GOG Games/outlaws/",
103103
};
104-
static const u32 c_hardcodedPathCount = TFE_ARRAYSIZE(c_darkForcesLocations);
104+
static const u32 c_hardcodedPathCount[] = { TFE_ARRAYSIZE(c_darkForcesLocations), TFE_ARRAYSIZE(c_outlawsLocations) };
105105

106106
static const char* const * c_gameLocations[] =
107107
{

TheForceEngine/TFE_Settings/settings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ namespace TFE_Settings
232232
{
233233
// Try various possible locations.
234234
const char* const * locations = c_gameLocations[gameId];
235-
for (u32 i = 0; i < c_hardcodedPathCount; i++)
235+
for (u32 i = 0; i < c_hardcodedPathCount[gameId]; i++)
236236
{
237237
if (FileUtil::directoryExits(locations[i]))
238238
{

0 commit comments

Comments
 (0)