Refactored Project Structure for use with emulator

This commit is contained in:
t-moe
2015-04-03 12:02:33 +02:00
commit 51089aaba1
16 changed files with 336 additions and 0 deletions

31
emulator/qt/main.cpp Normal file
View File

@@ -0,0 +1,31 @@
#include <QApplication>
#include <QtConcurrent/QtConcurrent>
extern "C" {
void qt_init(int argc, char* argv[]);
int qt_execute();
void app_init();
void app_process();
}
QApplication* app_ptr;
void qt_init(int argc, char* argv[]) {
static QApplication app(argc,argv);
app_ptr = &app;
app_init();
}
void app_loop() {
while(1) {
app_process();
QApplication::processEvents();
}
}
int qt_execute() {
QtConcurrent::run(&app_loop);
return app_ptr->exec();
}