Improve match of MxRegion::vtable18 (#266)

* Match MxRegionTopBottom::FUN_100c5280

* Resolve OtherAppend/Append

* Remove old code

* MxRegion::vtable18 up to 80%, refactor MxRect
This commit is contained in:
Christian Semmler
2023-11-06 18:12:09 -05:00
committed by GitHub
parent d5cf23bada
commit 23f4fda304
7 changed files with 123 additions and 107 deletions

View File

@@ -75,26 +75,9 @@ void MxVideoManager::Destroy(MxBool p_fromDestructor)
void MxVideoManager::UpdateRegion()
{
if (m_region->vtable20() == FALSE) {
MxS32 left, top, right, bottom;
MxRect32& regionRect = m_region->GetRect();
left = m_videoParam.GetRect().m_left;
if (left <= regionRect.m_left)
left = regionRect.m_left;
top = regionRect.m_top;
if (top <= m_videoParam.GetRect().m_top)
top = m_videoParam.GetRect().m_top;
right = regionRect.m_right;
if (right >= m_videoParam.GetRect().m_right)
right = m_videoParam.GetRect().m_right;
bottom = m_videoParam.GetRect().m_bottom;
if (bottom >= regionRect.m_bottom)
bottom = regionRect.m_bottom;
m_displaySurface->Display(left, top, left, top, right - left + 1, bottom - top + 1);
MxRect32 rect(m_region->GetRect(), m_videoParam.GetRect());
m_displaySurface
->Display(rect.GetLeft(), rect.GetTop(), rect.GetLeft(), rect.GetTop(), rect.GetWidth(), rect.GetHeight());
}
}