From b0dbd4f4afcf60e4021cbb3218bfe280c4989859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 8 Dec 2013 22:06:04 +0100 Subject: Fix offline mode bugs --- logic/LegacyUpdate.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'logic/LegacyUpdate.cpp') 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 #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() -- cgit v1.2.3