From ba8ce395cf7ad8a1f0dd4aa88f124e7b37395dd6 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 23 Feb 2019 07:11:57 -0600 Subject: Add function to get configured mods directory --- src/organizercore.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index caad45c9..ade8a9e3 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -477,7 +477,7 @@ bool OrganizerCore::testForSteam(bool *found, bool *access) (_tcsicmp(pe32.szExeFile, L"SteamService.exe") == 0)) { *found = true; - + // Try to open the process to determine if MO has the proper access hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pe32.th32ProcessID); @@ -866,6 +866,11 @@ QString OrganizerCore::basePath() const return QDir::fromNativeSeparators(m_Settings.getBaseDirectory()); } +QString OrganizerCore::modsPath() const +{ + return QDir::fromNativeSeparators(m_Settings.getModDirectory()); +} + MOBase::VersionInfo OrganizerCore::appVersion() const { return m_Updater.getVersion(); @@ -1328,8 +1333,8 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, bool steamAccess = true; if (!testForSteam(&steamFound, &steamAccess)) { qCritical("unable to determine state of Steam"); - } - + } + if (!steamFound) { QDialogButtonBox::StandardButton result; result = QuestionBoxMemory::query(window, "steamQuery", binary.fileName(), @@ -1352,8 +1357,8 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, } else if (result == QDialogButtonBox::Cancel) { return INVALID_HANDLE_VALUE; } - } - + } + if (!steamAccess) { QDialogButtonBox::StandardButton result; result = QuestionBoxMemory::query(window, "steamAdminQuery", binary.fileName(), -- cgit v1.3.1