Qt: Move Display setup code to common code

This commit is contained in:
Jeffrey Pfau 2015-04-04 14:17:06 -07:00
parent e9365cdda2
commit 2448ff715f
2 changed files with 7 additions and 3 deletions

View File

@ -5,9 +5,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "Display.h" #include "Display.h"
extern "C" {
#include "gba/video.h"
}
using namespace QGBA; using namespace QGBA;
Display::Display(QWidget* parent) Display::Display(QWidget* parent)
: QWidget(parent) : QWidget(parent)
{ {
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setMinimumSize(VIDEO_HORIZONTAL_PIXELS, VIDEO_VERTICAL_PIXELS);
setCursor(Qt::BlankCursor);
} }

View File

@ -33,9 +33,6 @@ DisplayGL::DisplayGL(const QGLFormat& format, QWidget* parent)
, m_painter(new Painter(format, this)) , m_painter(new Painter(format, this))
, m_started(false) , 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) { void DisplayGL::startDrawing(const uint32_t* buffer, GBAThread* thread) {