Qt: Load configuration file

This commit is contained in:
Jeffrey Pfau 2014-11-02 02:58:58 -08:00
parent 6788008418
commit d744714ac5
1 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,8 @@
#include <QFileOpenEvent>
#define PORT "qt"
using namespace QGBA;
GBAApp::GBAApp(int& argc, char* argv[])
@ -14,6 +16,15 @@ GBAApp::GBAApp(int& argc, char* argv[])
QApplication::setApplicationName(PROJECT_NAME);
QApplication::setApplicationVersion(PROJECT_VERSION);
struct Configuration config;
ConfigurationInit(&config);
GBAConfigLoad(&config);
GBAConfigMapGeneralOpts(&config, PORT, &m_opts);
ConfigurationDeinit(&config);
if (parseArguments(&m_args, &m_opts, argc, argv, 0)) {
m_window.setOptions(&m_opts);
m_window.argumentsPassed(&m_args);