From d313e9ab09639346526b75c92498188753cb5b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 2 Feb 2015 01:09:28 +0100 Subject: SCRATCH remove remaining references to MultiMC.h and fix legacy LWJGL --- logic/LegacyUpdate.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'logic/LegacyUpdate.cpp') diff --git a/logic/LegacyUpdate.cpp b/logic/LegacyUpdate.cpp index d955d456..e12556eb 100644 --- a/logic/LegacyUpdate.cpp +++ b/logic/LegacyUpdate.cpp @@ -31,7 +31,6 @@ #include "logger/QsLog.h" #include "logic/net/URLConstants.h" #include "JarUtils.h" -#include "MultiMC.h" LegacyUpdate::LegacyUpdate(BaseInstance *inst, QObject *parent) : Task(parent), m_inst(inst) { @@ -168,7 +167,7 @@ void LegacyUpdate::lwjglStart() LegacyInstance *inst = (LegacyInstance *)m_inst; lwjglVersion = inst->lwjglVersion(); - lwjglTargetPath = PathCombine(MMC->settings()->get("LWJGLDir").toString(), lwjglVersion); + lwjglTargetPath = PathCombine(inst->lwjglFolder(), lwjglVersion); lwjglNativesPath = PathCombine(lwjglTargetPath, "natives"); // if the 'done' file exists, we don't have to download this again @@ -179,7 +178,7 @@ void LegacyUpdate::lwjglStart() return; } - auto list = MMC->lwjgllist(); + auto list = std::dynamic_pointer_cast(ENV.getVersionList("org.lwjgl.legacy")); if (!list->isLoaded()) { emitFailed("Too soon! Let the LWJGL list load :)"); @@ -187,7 +186,7 @@ void LegacyUpdate::lwjglStart() } setStatus(tr("Downloading new LWJGL...")); - auto version = list->getVersion(lwjglVersion); + auto version = std::dynamic_pointer_cast(list->findVersion(lwjglVersion)); if (!version) { emitFailed("Game update failed: the selected LWJGL version is invalid."); -- cgit v1.2.3