From 6d89c37886d461c0fad868a4c1dc12fd29a2b8af Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 2 Nov 2014 03:38:00 -0800 Subject: [PATCH] Qt: Support setting for width and height --- src/platform/qt/GBAApp.cpp | 1 + src/platform/qt/Window.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/platform/qt/GBAApp.cpp b/src/platform/qt/GBAApp.cpp index 28f09f0f6..bf9c30cdc 100644 --- a/src/platform/qt/GBAApp.cpp +++ b/src/platform/qt/GBAApp.cpp @@ -22,6 +22,7 @@ GBAApp::GBAApp(int& argc, char* argv[]) GBAConfigLoad(&config); GBAConfigMapGeneralOpts(&config, PORT, &m_opts); + GBAConfigMapGraphicsOpts(&config, PORT, &m_opts); ConfigurationDeinit(&config); diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index c678b1cc7..545463437 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -126,6 +126,10 @@ void Window::setOptions(GBAOptions* opts) { if (opts->audioBuffers) { emit audioBufferSamplesChanged(opts->audioBuffers); } + + if (opts->width && opts->height) { + m_screenWidget->setSizeHint(QSize(opts->width, opts->height)); + } } void Window::selectROM() {