Qt: Fix video stride

This commit is contained in:
Vicki Pfau 2018-09-15 16:29:03 -07:00
parent 42b3647511
commit 723ac4c173
1 changed files with 2 additions and 2 deletions

View File

@ -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<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 @@ 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<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();