mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix video stride
This commit is contained in:
parent
42b3647511
commit
723ac4c173
|
@ -91,7 +91,7 @@ CoreController::CoreController(mCore* core, QObject* parent)
|
||||||
controller->m_resetActions.clear();
|
controller->m_resetActions.clear();
|
||||||
|
|
||||||
controller->m_activeBuffer = &controller->m_buffers[0];
|
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();
|
controller->finishFrame();
|
||||||
};
|
};
|
||||||
|
@ -799,7 +799,7 @@ void CoreController::finishFrame() {
|
||||||
}
|
}
|
||||||
// Copy contents to avoid issues when doing frameskip
|
// Copy contents to avoid issues when doing frameskip
|
||||||
memcpy(m_activeBuffer->data(), m_completeBuffer->data(), m_activeBuffer->size());
|
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) {
|
for (auto& action : m_frameActions) {
|
||||||
action();
|
action();
|
||||||
|
|
Loading…
Reference in New Issue