diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-08 22:06:04 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-08 22:06:04 +0100 |
commit | b0dbd4f4afcf60e4021cbb3218bfe280c4989859 (patch) | |
tree | c8ca3fd733e04ef7c0f064089782724db312f4a1 /logic/LegacyUpdate.cpp | |
parent | 9410dd042ea62224fa3e0eb3b525abbdf0c316ee (diff) | |
download | MultiMC-b0dbd4f4afcf60e4021cbb3218bfe280c4989859.tar MultiMC-b0dbd4f4afcf60e4021cbb3218bfe280c4989859.tar.gz MultiMC-b0dbd4f4afcf60e4021cbb3218bfe280c4989859.tar.lz MultiMC-b0dbd4f4afcf60e4021cbb3218bfe280c4989859.tar.xz MultiMC-b0dbd4f4afcf60e4021cbb3218bfe280c4989859.zip |
Fix offline mode bugs
Diffstat (limited to 'logic/LegacyUpdate.cpp')
-rw-r--r-- | logic/LegacyUpdate.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/logic/LegacyUpdate.cpp b/logic/LegacyUpdate.cpp index 3fc17351..6125101b 100644 --- a/logic/LegacyUpdate.cpp +++ b/logic/LegacyUpdate.cpp @@ -26,14 +26,30 @@ #include <JlCompress.h> #include "logger/QsLog.h" -LegacyUpdate::LegacyUpdate(BaseInstance *inst, bool prepare_for_launch, QObject *parent) - : Task(parent), m_inst(inst), m_prepare_for_launch(prepare_for_launch) +LegacyUpdate::LegacyUpdate(BaseInstance *inst, bool only_prepare, QObject *parent) + : Task(parent), m_inst(inst), m_only_prepare(only_prepare) { } void LegacyUpdate::executeTask() { - lwjglStart(); + if(m_only_prepare) + { + // FIXME: think this through some more. + LegacyInstance *inst = (LegacyInstance *)m_inst; + if (!inst->shouldUpdate() || inst->shouldUseCustomBaseJar()) + { + ModTheJar(); + } + else + { + emitSucceeded(); + } + } + else + { + lwjglStart(); + } } void LegacyUpdate::lwjglStart() |