all repos — mgba @ b86d3f9fc3fe60ab362ed824b5b16e61608b10ff

mGBA Game Boy Advance Emulator

Qt: Fix frame copy
Vicki Pfau vi@endrift.com
Sat, 15 Sep 2018 16:04:59 -0700
commit

b86d3f9fc3fe60ab362ed824b5b16e61608b10ff

parent

0849001f9685652670ec46465af9011cb21212dd

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

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

@@ -798,8 +798,8 @@ if (m_activeBuffer == m_completeBuffer) {

m_activeBuffer = &m_buffers[1]; } // Copy contents to avoid issues when doing frameskip - *m_activeBuffer = *m_completeBuffer; - m_threadContext.core->setVideoBuffer(m_threadContext.core, reinterpret_cast<color_t*>(m_activeBuffer->data()), screenDimensions().width()); + 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); for (auto& action : m_frameActions) { action();