From 2a50683133953edd80606aedbdd93a7f10d4a7d8 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Mon, 23 Nov 2015 13:35:48 +0000 Subject: Removed 'requiresSteam' which is only used in one place and might or might not be game related --- src/organizercore.cpp | 5 ++++- src/shared/gameinfo.cpp | 5 ----- src/shared/gameinfo.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 826d5bea..ee69c46b 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -950,7 +950,10 @@ HANDLE OrganizerCore::spawnBinaryDirect(const QFileInfo &binary, const QString & ::SetEnvironmentVariableW(L"SteamAPPId", ToWString(m_Settings.getSteamAppID()).c_str()); } - if ((GameInfo::instance().requiresSteam()) + + //This could possibly be extracted somewhere else but it's probably for when + //we have more than one provider of game registration. + if (QFileInfo(managedGame()->gameDirectory().absoluteFilePath("steam_api.dll")).exists() && (m_Settings.getLoadMechanism() == LoadMechanism::LOAD_MODORGANIZER)) { if (!testForSteam()) { QWidget *window = qApp->activeWindow(); diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index 703f4a40..2890e9cc 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -135,11 +135,6 @@ std::wstring GameInfo::getGameDirectory() const return m_GameDirectory; } -bool GameInfo::requiresSteam() const -{ - return FileExists(getGameDirectory() + L"\\steam_api.dll"); -} - std::wstring GameInfo::getLocalAppFolder() const { wchar_t localAppFolder[MAX_PATH]; diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 57613e5e..e1a70597 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -71,8 +71,6 @@ public: //**USED IN HOOKDLL virtual std::wstring getGameDirectory() const; - virtual bool requiresSteam() const; - // get a list of file extensions for additional files belonging to a save game virtual std::vector getSavegameAttachmentExtensions() = 0; -- cgit v1.3.1