MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / main

Function main

launcher/main.cpp:47–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45#endif
46
47int main(int argc, char* argv[])
48{
49#ifdef BREAK_INFINITE_LOOP
50 while (true) {
51 std::this_thread::sleep_for(std::chrono::milliseconds(250));
52 }
53#endif
54#ifdef BREAK_EXCEPTION
55 throw 42;
56#endif
57#ifdef BREAK_RETURN
58 return 42;
59#endif
60
61#if QT_VERSION <= QT_VERSION_CHECK(6, 0, 0)
62 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
63 QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
64#endif
65
66 // initialize Qt
67 Application app(argc, argv);
68
69 switch (app.status()) {
70 case Application::StartingUp:
71 case Application::Initialized: {
72 Q_INIT_RESOURCE(multimc);
73 Q_INIT_RESOURCE(backgrounds);
74 Q_INIT_RESOURCE(documents);
75 Q_INIT_RESOURCE(prismlauncher);
76
77 Q_INIT_RESOURCE(pe_dark);
78 Q_INIT_RESOURCE(pe_light);
79 Q_INIT_RESOURCE(pe_blue);
80 Q_INIT_RESOURCE(pe_colored);
81 Q_INIT_RESOURCE(breeze_dark);
82 Q_INIT_RESOURCE(breeze_light);
83 Q_INIT_RESOURCE(OSX);
84 Q_INIT_RESOURCE(iOS);
85 Q_INIT_RESOURCE(flat);
86 Q_INIT_RESOURCE(flat_white);
87 return app.exec();
88 }
89 case Application::Failed:
90 return 1;
91 case Application::Succeeded:
92 return 0;
93 default:
94 return -1;
95 }
96}

Callers

nothing calls this directly

Calls 2

statusMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected