MCPcopy Create free account
hub / github.com/MultiMC/Launcher / main

Function main

launcher/main.cpp:12–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#endif
11
12int main(int argc, char *argv[])
13{
14#ifdef BREAK_INFINITE_LOOP
15 while(true)
16 {
17 std::this_thread::sleep_for(std::chrono::milliseconds(250));
18 }
19#endif
20#ifdef BREAK_EXCEPTION
21 throw 42;
22#endif
23#ifdef BREAK_RETURN
24 return 42;
25#endif
26
27#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
28 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
29 QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
30#endif
31
32 // initialize Qt
33 Application app(argc, argv);
34
35 switch (app.status())
36 {
37 case Application::StartingUp:
38 case Application::Initialized:
39 {
40 Q_INIT_RESOURCE(multimc);
41 Q_INIT_RESOURCE(backgrounds);
42 Q_INIT_RESOURCE(documents);
43 Q_INIT_RESOURCE(logo);
44
45 Q_INIT_RESOURCE(pe_dark);
46 Q_INIT_RESOURCE(pe_light);
47 Q_INIT_RESOURCE(pe_blue);
48 Q_INIT_RESOURCE(pe_colored);
49 Q_INIT_RESOURCE(OSX);
50 Q_INIT_RESOURCE(iOS);
51 Q_INIT_RESOURCE(flat);
52 return app.exec();
53 }
54 case Application::Failed:
55 return 1;
56 case Application::Succeeded:
57 return 0;
58 }
59}

Callers

nothing calls this directly

Calls 2

statusMethod · 0.80
execMethod · 0.45

Tested by

no test coverage detected