all repos — mgba @ 723ac4c17307f8cc7a57bf330b51b6e0b3df4495

mGBA Game Boy Advance Emulator

Qt: Fix video stride
Vicki Pfau vi@endrift.com
Sat, 15 Sep 2018 16:29:03 -0700
commit

723ac4c17307f8cc7a57bf330b51b6e0b3df4495

parent

42b3647511a1febdfb61c5b74744df973e4cc50a

1 files changed, 2 insertions(+), 2 deletions(-)

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

@@ -91,7 +91,7 @@

controller->m_resetActions.clear(); controller->m_activeBuffer = &controller->m_buffers[0]; - context->core->setVideoBuffer(context->core, reinterpret_cast<color_t*>(controller->m_activeBuffer->data()), 256); + context->core->setVideoBuffer(context->core, reinterpret_cast<color_t*>(controller->m_activeBuffer->data()), controller->screenDimensions().width()); controller->finishFrame(); };

@@ -799,7 +799,7 @@ m_activeBuffer = &m_buffers[1];

} // 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<color_t*>(m_activeBuffer->data()), 256); + m_threadContext.core->setVideoBuffer(m_threadContext.core, reinterpret_cast<color_t*>(m_activeBuffer->data()), screenDimensions().width()); for (auto& action : m_frameActions) { action();