summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-02-23 07:11:57 -0600
committerLostDragonist <lost.dragonist@gmail.com>2019-02-23 07:11:57 -0600
commitba8ce395cf7ad8a1f0dd4aa88f124e7b37395dd6 (patch)
treed3a10a09094262d9443e4503910ed0a21899e96b /src
parent208f389300b308966b8354a631bc18f1ad0880d5 (diff)
Add function to get configured mods directory
Diffstat (limited to 'src')
-rw-r--r--src/organizercore.cpp15
-rw-r--r--src/organizercore.h1
-rw-r--r--src/organizerproxy.cpp5
-rw-r--r--src/organizerproxy.h1
4 files changed, 17 insertions, 5 deletions
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(),
diff --git a/src/organizercore.h b/src/organizercore.h
index 2757aaf3..2a31d00a 100644
--- a/src/organizercore.h
+++ b/src/organizercore.h
@@ -187,6 +187,7 @@ public:
QString downloadsPath() const;
QString overwritePath() const;
QString basePath() const;
+ QString modsPath() const;
MOBase::VersionInfo appVersion() const;
MOBase::IModInterface *getMod(const QString &name) const;
MOBase::IPluginGame *getGame(const QString &gameName) const;
diff --git a/src/organizerproxy.cpp b/src/organizerproxy.cpp
index 8e0bc95b..019904ee 100644
--- a/src/organizerproxy.cpp
+++ b/src/organizerproxy.cpp
@@ -50,6 +50,11 @@ QString OrganizerProxy::basePath() const
return m_Proxied->basePath();
}
+QString OrganizerProxy::modsPath() const
+{
+ return m_Proxied->modsPath();
+}
+
VersionInfo OrganizerProxy::appVersion() const
{
return m_Proxied->appVersion();
diff --git a/src/organizerproxy.h b/src/organizerproxy.h
index b8eb9b82..b8a4ea50 100644
--- a/src/organizerproxy.h
+++ b/src/organizerproxy.h
@@ -20,6 +20,7 @@ public:
virtual QString downloadsPath() const;
virtual QString overwritePath() const;
virtual QString basePath() const;
+ virtual QString modsPath() const;
virtual MOBase::VersionInfo appVersion() const;
virtual MOBase::IModInterface *getMod(const QString &name) const;
virtual MOBase::IPluginGame *getGame(const QString &gameName) const;