all repos — mgba @ 2448ff715fcb1216db8a9d7c51087a4e8255015c

mGBA Game Boy Advance Emulator

Qt: Move Display setup code to common code
Jeffrey Pfau jeffrey@endrift.com
Sat, 04 Apr 2015 14:17:06 -0700
commit

2448ff715fcb1216db8a9d7c51087a4e8255015c

parent

e9365cdda22f3c41b5b0f208cc248439e8b80676

2 files changed, 7 insertions(+), 3 deletions(-)

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

@@ -5,9 +5,16 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this

* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "Display.h" +extern "C" { +#include "gba/video.h" +} + using namespace QGBA; Display::Display(QWidget* parent) : QWidget(parent) { + setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + setMinimumSize(VIDEO_HORIZONTAL_PIXELS, VIDEO_VERTICAL_PIXELS); + setCursor(Qt::BlankCursor); }
M src/platform/qt/DisplayGL.cppsrc/platform/qt/DisplayGL.cpp

@@ -33,9 +33,6 @@ : Display(parent)

, m_painter(new Painter(format, this)) , m_started(false) { - setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); - setMinimumSize(VIDEO_HORIZONTAL_PIXELS, VIDEO_VERTICAL_PIXELS); - setCursor(Qt::BlankCursor); } void DisplayGL::startDrawing(const uint32_t* buffer, GBAThread* thread) {