From 723ac4c17307f8cc7a57bf330b51b6e0b3df4495 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 15 Sep 2018 16:29:03 -0700 Subject: [PATCH] Qt: Fix video stride --- src/platform/qt/CoreController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/qt/CoreController.cpp b/src/platform/qt/CoreController.cpp index dd2b82191..f81eb6c9b 100644 --- a/src/platform/qt/CoreController.cpp +++ b/src/platform/qt/CoreController.cpp @@ -91,7 +91,7 @@ CoreController::CoreController(mCore* core, QObject* parent) controller->m_resetActions.clear(); controller->m_activeBuffer = &controller->m_buffers[0]; - context->core->setVideoBuffer(context->core, reinterpret_cast(controller->m_activeBuffer->data()), 256); + context->core->setVideoBuffer(context->core, reinterpret_cast(controller->m_activeBuffer->data()), controller->screenDimensions().width()); controller->finishFrame(); }; @@ -799,7 +799,7 @@ void CoreController::finishFrame() { } // Copy contents to avoid issues when doing frameskip memcpy(m_activeBuffer->data(), m_completeBuffer->data(), m_activeBuffer->size()); - m_threadContext.core->setVideoBuffer(m_threadContext.core, reinterpret_cast(m_activeBuffer->data()), 256); + m_threadContext.core->setVideoBuffer(m_threadContext.core, reinterpret_cast(m_activeBuffer->data()), screenDimensions().width()); for (auto& action : m_frameActions) { action();