diff --git a/src/gamefallout3.cpp b/src/gamefallout3.cpp index 0be01e5..118778c 100644 --- a/src/gamefallout3.cpp +++ b/src/gamefallout3.cpp @@ -49,18 +49,18 @@ bool GameFallout3::init(IOrganizer* moInfo) return true; } -void GameFallout3::checkVariants() +QString GameFallout3::variantName() const { if (QFile::exists(m_GamePath + "/Fallout3ng.exe")) { - setGameVariant("Low Violence"); + return "Low Violence"; } else if (QFile::exists(m_GamePath + "/Galaxy.dll")) { - setGameVariant("GOG"); + return "GOG"; } else if (QFile::exists(m_GamePath + "/FalloutLauncherEpic.exe")) { - setGameVariant("Epic Games"); + return "Epic Games"; } else if (m_GamePath.endsWith("Fallout 3 goty")) { - setGameVariant("Steam (Game of the Year)"); + return "Steam (Game of the Year)"; } else { - setGameVariant("Steam (Regular)"); + return "Steam (Regular)"; } } @@ -103,7 +103,7 @@ QString GameFallout3::gameName() const void GameFallout3::detectGame() { m_GamePath = identifyGamePath(); - checkVariants(); + setGameVariant(variantName()); m_MyGamesPath = determineMyGamesPath("Fallout3"); } diff --git a/src/gamefallout3.h b/src/gamefallout3.h index ec41954..783b955 100644 --- a/src/gamefallout3.h +++ b/src/gamefallout3.h @@ -52,7 +52,7 @@ class GameFallout3 : public GameGamebryo std::shared_ptr makeSaveGame(QString filePath) const override; private: - void checkVariants(); + QString variantName() const; }; #endif // GAMEFALLOUT3_H