mirror of https://github.com/mgba-emu/mgba.git
Qt: Load configuration file
This commit is contained in:
parent
6788008418
commit
d744714ac5
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include <QFileOpenEvent>
|
#include <QFileOpenEvent>
|
||||||
|
|
||||||
|
#define PORT "qt"
|
||||||
|
|
||||||
using namespace QGBA;
|
using namespace QGBA;
|
||||||
|
|
||||||
GBAApp::GBAApp(int& argc, char* argv[])
|
GBAApp::GBAApp(int& argc, char* argv[])
|
||||||
|
@ -14,6 +16,15 @@ GBAApp::GBAApp(int& argc, char* argv[])
|
||||||
QApplication::setApplicationName(PROJECT_NAME);
|
QApplication::setApplicationName(PROJECT_NAME);
|
||||||
QApplication::setApplicationVersion(PROJECT_VERSION);
|
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)) {
|
if (parseArguments(&m_args, &m_opts, argc, argv, 0)) {
|
||||||
m_window.setOptions(&m_opts);
|
m_window.setOptions(&m_opts);
|
||||||
m_window.argumentsPassed(&m_args);
|
m_window.argumentsPassed(&m_args);
|
||||||
|
|
Loading…
Reference in New Issue