summaryrefslogtreecommitdiffstats
path: root/MultiMC.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-10-28 21:50:58 +0100
committerPetr Mrázek <peterix@gmail.com>2013-10-28 21:50:58 +0100
commit7df667f823fc4a679148dfea215b25642babb48f (patch)
treeb992f3180b2703e3fcdae440f0236dbc5f2d9d64 /MultiMC.cpp
parent6ecb833dbf4c4930c8354dcce7967ad44c16c217 (diff)
downloadMultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar
MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.gz
MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.lz
MultiMC-7df667f823fc4a679148dfea215b25642babb48f.tar.xz
MultiMC-7df667f823fc4a679148dfea215b25642babb48f.zip
Valgrind-checked early application start
Diffstat (limited to 'MultiMC.cpp')
-rw-r--r--MultiMC.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/MultiMC.cpp b/MultiMC.cpp
index 56109ba6..4e2a5b0b 100644
--- a/MultiMC.cpp
+++ b/MultiMC.cpp
@@ -351,20 +351,24 @@ std::shared_ptr<JavaVersionList> MultiMC::javalist()
return m_javalist;
}
-int main(int argc, char *argv[])
+int main_gui(MultiMC & app)
{
- // initialize Qt
- MultiMC app(argc, argv);
-
// show main window
MainWindow mainWin;
mainWin.show();
mainWin.checkSetDefaultJava();
+ return app.exec();
+}
+
+int main(int argc, char *argv[])
+{
+ // initialize Qt
+ MultiMC app(argc, argv);
switch (app.status())
{
case MultiMC::Initialized:
- return app.exec();
+ return main_gui(app);
case MultiMC::Failed:
return 1;
case MultiMC::Succeeded: