From 41c19a8f098bd7ee7cebe5878e7db9a13ef2d16d Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Thu, 2 Jul 2015 23:21:25 -0700 Subject: [PATCH] Qt: Fix setting the display driver --- src/platform/qt/GBAApp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform/qt/GBAApp.cpp b/src/platform/qt/GBAApp.cpp index 326bfbbcb..c40eb42ba 100644 --- a/src/platform/qt/GBAApp.cpp +++ b/src/platform/qt/GBAApp.cpp @@ -41,6 +41,10 @@ GBAApp::GBAApp(int& argc, char* argv[]) QApplication::setApplicationName(projectName); QApplication::setApplicationVersion(projectVersion); + if (!m_configController.getQtOption("displayDriver").isNull()) { + Display::setDriver(static_cast(m_configController.getQtOption("displayDriver").toInt())); + } + Window* w = new Window(&m_configController); connect(w, &Window::destroyed, [this]() { m_windows[0] = nullptr; @@ -59,7 +63,6 @@ GBAApp::GBAApp(int& argc, char* argv[]) } freeArguments(&args); - Display::setDriver(static_cast(m_configController.getQtOption("videoDriver").toInt())); AudioProcessor::setDriver(static_cast(m_configController.getQtOption("audioDriver").toInt())); w->controller()->reloadAudioDriver();