aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/Application.cpp')
-rw-r--r--launcher/Application.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index bafb928b..0ef641ba 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -334,10 +334,6 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// on macOS, touch the root to force Finder to reload the .app metadata (and fix any icon change issues)
FS::updateTimestamp(m_rootPath);
#endif
-
-#ifdef LAUNCHER_JARS_LOCATION
- m_jarsPath = TOSTRING(LAUNCHER_JARS_LOCATION);
-#endif
}
QString adjustedBy;
@@ -638,6 +634,11 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_settings->registerSetting("UseNativeOpenAL", false);
m_settings->registerSetting("UseNativeGLFW", false);
+ // Peformance related options
+ m_settings->registerSetting("EnableFeralGamemode", false);
+ m_settings->registerSetting("EnableMangoHud", false);
+ m_settings->registerSetting("UseDiscreteGpu", false);
+
// Game time
m_settings->registerSetting("ShowGameTime", true);
m_settings->registerSetting("ShowGlobalGameTime", true);
@@ -1557,13 +1558,22 @@ shared_qobject_ptr<Meta::Index> Application::metadataIndex()
return m_metadataIndex;
}
-QString Application::getJarsPath()
+QString Application::getJarPath(QString jarFile)
{
- if(m_jarsPath.isEmpty())
+ QStringList potentialPaths = {
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD)
+ FS::PathCombine(m_rootPath, "share/jars"),
+#endif
+ FS::PathCombine(m_rootPath, "jars"),
+ FS::PathCombine(applicationDirPath(), "jars")
+ };
+ for(QString p : potentialPaths)
{
- return FS::PathCombine(QCoreApplication::applicationDirPath(), "jars");
+ QString jarPath = FS::PathCombine(p, jarFile);
+ if (QFileInfo(jarPath).isFile())
+ return jarPath;
}
- return FS::PathCombine(m_rootPath, m_jarsPath);
+ return {};
}
QString Application::getMSAClientID()