src/platform/qt/main.cpp (view raw)
1#include <QApplication>
2#include "Window.h"
3
4extern "C" {
5#include "platform/commandline.h"
6}
7
8int main(int argc, char* argv[]) {
9 QApplication application(argc, argv);
10 QApplication::setApplicationName(PROJECT_NAME);
11 QApplication::setApplicationVersion(PROJECT_VERSION);
12
13 QGBA::Window window;
14
15 struct StartupOptions opts;
16 if (parseCommandArgs(&opts, argc, argv, 0)) {
17 window.optionsPassed(&opts);
18 }
19 window.show();
20
21 int rcode = application.exec();
22 freeOptions(&opts);
23 return rcode;
24}