summaryrefslogtreecommitdiffstats
path: root/logic/LegacyInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-02-02 01:09:28 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-12 20:57:17 +0200
commitd313e9ab09639346526b75c92498188753cb5b87 (patch)
tree1df78fb6150b77a705b48aa3af0a845131000309 /logic/LegacyInstance.cpp
parent382ae78a0bf75892827321b052c6afbd195476bc (diff)
downloadMultiMC-d313e9ab09639346526b75c92498188753cb5b87.tar
MultiMC-d313e9ab09639346526b75c92498188753cb5b87.tar.gz
MultiMC-d313e9ab09639346526b75c92498188753cb5b87.tar.lz
MultiMC-d313e9ab09639346526b75c92498188753cb5b87.tar.xz
MultiMC-d313e9ab09639346526b75c92498188753cb5b87.zip
SCRATCH remove remaining references to MultiMC.h and fix legacy LWJGL
Diffstat (limited to 'logic/LegacyInstance.cpp')
-rw-r--r--logic/LegacyInstance.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/logic/LegacyInstance.cpp b/logic/LegacyInstance.cpp
index ff1eed44..11566866 100644
--- a/logic/LegacyInstance.cpp
+++ b/logic/LegacyInstance.cpp
@@ -20,8 +20,6 @@
#include <pathutils.h>
#include <cmdutils.h>
-#include "MultiMC.h"
-
#include "LegacyInstance.h"
#include "logic/LegacyUpdate.h"
@@ -38,6 +36,7 @@
LegacyInstance::LegacyInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr settings, const QString &rootDir)
: MinecraftInstance(globalSettings, settings, rootDir)
{
+ m_lwjglFolderSetting = globalSettings->getSetting("LWJGLDir");
settings->registerSetting("NeedsRebuild", true);
settings->registerSetting("ShouldUpdate", false);
settings->registerSetting("JarVersion", "Unknown");
@@ -142,7 +141,7 @@ BaseProcess *LegacyInstance::prepareForLaunch(AuthSessionPtr account)
.arg(settings().get("MinecraftWinWidth").toInt())
.arg(settings().get("MinecraftWinHeight").toInt());
- QString lwjgl = QDir(MMC->settings()->get("LWJGLDir").toString() + "/" + lwjglVersion())
+ QString lwjgl = QDir(m_lwjglFolderSetting->get().toString() + "/" + lwjglVersion())
.absolutePath();
launchScript += "userName " + account->player_name + "\n";
launchScript += "sessionId " + account->session + "\n";
@@ -340,3 +339,8 @@ QString LegacyInstance::getStatusbarDescription()
}
return tr("Legacy : %1").arg(intendedVersionId());
}
+
+QString LegacyInstance::lwjglFolder() const
+{
+ return m_lwjglFolderSetting->get().toString();
+}