MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / main

Function main

launcher/main.cpp:47–95  ·  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 {
52 std::this_thread::sleep_for(std::chrono::milliseconds(250));
53 }
54#endif
55#ifdef BREAK_EXCEPTION
56 throw 42;
57#endif
58#ifdef BREAK_RETURN
59 return 42;
60#endif
61
62#if QT_VERSION <= QT_VERSION_CHECK(6, 0, 0)
63 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
64 QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
65#endif
66
67 // initialize Qt
68 Application app(argc, argv);
69
70 switch (app.status())
71 {
72 case Application::StartingUp:
73 case Application::Initialized:
74 {
75 Q_INIT_RESOURCE(multimc);
76 Q_INIT_RESOURCE(backgrounds);
77 Q_INIT_RESOURCE(documents);
78 Q_INIT_RESOURCE(polymc);
79
80 Q_INIT_RESOURCE(pe_dark);
81 Q_INIT_RESOURCE(pe_light);
82 Q_INIT_RESOURCE(pe_blue);
83 Q_INIT_RESOURCE(pe_colored);
84 Q_INIT_RESOURCE(OSX);
85 Q_INIT_RESOURCE(iOS);
86 Q_INIT_RESOURCE(flat);
87 return app.exec();
88 }
89 case Application::Failed:
90 return 1;
91 case Application::Succeeded:
92 return 0;
93 }
94 return 0;
95}

Callers

nothing calls this directly

Calls 2

statusMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected