all repos — mgba @ bdb584a39849899db5062f0894058c7783860381

mGBA Game Boy Advance Emulator

Qt: Fix GL scaling
Vicki Pfau vi@endrift.com
Mon, 20 May 2019 19:12:45 -0700
commit

bdb584a39849899db5062f0894058c7783860381

parent

838d13f2efb8b97aa7e09f93441b5f5090326b8f

M src/platform/qt/CoreController.cppsrc/platform/qt/CoreController.cpp

@@ -86,6 +86,7 @@ controller->m_activeBuffer = &controller->m_buffers[0];

context->core->setVideoBuffer(context->core, reinterpret_cast<color_t*>(controller->m_activeBuffer->data()), controller->screenDimensions().width()); } + QMetaObject::invokeMethod(controller, "didReset"); controller->finishFrame(); };
M src/platform/qt/CoreController.hsrc/platform/qt/CoreController.h

@@ -170,6 +170,7 @@ void stopping();

void crashed(const QString& errorMessage); void failed(); void frameAvailable(); + void didReset(); void stateLoaded(); void rewound();
M src/platform/qt/DisplayGL.cppsrc/platform/qt/DisplayGL.cpp

@@ -108,6 +108,7 @@ #else

messagePainter()->resize(size(), isAspectRatioLocked(), devicePixelRatio()); #endif resizePainter(); + connect(m_context.get(), &CoreController::didReset, this, &DisplayGL::resizeContext); } void DisplayGL::stopDrawing() {