diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-02-02 01:09:28 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-12 20:57:17 +0200 |
commit | d313e9ab09639346526b75c92498188753cb5b87 (patch) | |
tree | 1df78fb6150b77a705b48aa3af0a845131000309 /logic/LegacyUpdate.cpp | |
parent | 382ae78a0bf75892827321b052c6afbd195476bc (diff) | |
download | MultiMC-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/LegacyUpdate.cpp')
-rw-r--r-- | logic/LegacyUpdate.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<LWJGLVersionList>(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<LWJGLVersion>(list->findVersion(lwjglVersion)); if (!version) { emitFailed("Game update failed: the selected LWJGL version is invalid."); |