all repos — mgba @ 41c19a8f098bd7ee7cebe5878e7db9a13ef2d16d

mGBA Game Boy Advance Emulator

Qt: Fix setting the display driver
Jeffrey Pfau jeffrey@endrift.com
Thu, 02 Jul 2015 23:21:25 -0700
commit

41c19a8f098bd7ee7cebe5878e7db9a13ef2d16d

parent

5b3fd879b4f3cec332edede1b2daad217f7a31b7

1 files changed, 4 insertions(+), 1 deletions(-)

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

@@ -41,6 +41,10 @@

QApplication::setApplicationName(projectName); QApplication::setApplicationVersion(projectVersion); + if (!m_configController.getQtOption("displayDriver").isNull()) { + Display::setDriver(static_cast<Display::Driver>(m_configController.getQtOption("displayDriver").toInt())); + } + Window* w = new Window(&m_configController); connect(w, &Window::destroyed, [this]() { m_windows[0] = nullptr;

@@ -59,7 +63,6 @@ w->loadConfig();

} freeArguments(&args); - Display::setDriver(static_cast<Display::Driver>(m_configController.getQtOption("videoDriver").toInt())); AudioProcessor::setDriver(static_cast<AudioProcessor::Driver>(m_configController.getQtOption("audioDriver").toInt())); w->controller()->reloadAudioDriver();