all repos — mgba @ d744714ac58b5afea6d8117af5290caf76422797

mGBA Game Boy Advance Emulator

Qt: Load configuration file
Jeffrey Pfau jeffrey@endrift.com
Sun, 02 Nov 2014 02:58:58 -0800
commit

d744714ac58b5afea6d8117af5290caf76422797

parent

67880084187c309ca7049f7e8a22859006172f8d

1 files changed, 11 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/GBAApp.cppsrc/platform/qt/GBAApp.cpp

@@ -4,6 +4,8 @@ #include "GameController.h"

#include <QFileOpenEvent> +#define PORT "qt" + using namespace QGBA; GBAApp::GBAApp(int& argc, char* argv[])

@@ -13,6 +15,15 @@ , m_opts()

{ 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);