mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-26 17:46:38 -05:00
Match MxDisplaySurface::Display (#607)
This commit is contained in:
parent
79713698cf
commit
e609924e4c
1 changed files with 9 additions and 14 deletions
|
@ -518,28 +518,23 @@ void MxDisplaySurface::Display(MxS32 p_left, MxS32 p_top, MxS32 p_left2, MxS32 p
|
||||||
m_ddSurface1->Flip(NULL, DDFLIP_WAIT);
|
m_ddSurface1->Flip(NULL, DDFLIP_WAIT);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
POINT point = {0, 0};
|
MxPoint32 point(0, 0);
|
||||||
ClientToScreen(MxOmni::GetInstance()->GetWindowHandle(), &point);
|
ClientToScreen(MxOmni::GetInstance()->GetWindowHandle(), (LPPOINT) &point);
|
||||||
|
|
||||||
// TODO: Match
|
p_left2 += m_videoParam.GetRect().GetLeft() + point.GetX();
|
||||||
RECT rect1, rect2;
|
p_top2 += m_videoParam.GetRect().GetTop() + point.GetY();
|
||||||
rect1.left = p_left2 + m_videoParam.GetRect().GetLeft() + point.x;
|
|
||||||
rect2.left = p_left;
|
MxRect32 a(MxPoint32(p_left, p_top), MxSize32(p_width + 1, p_height + 1));
|
||||||
rect1.top = p_top2 + m_videoParam.GetRect().GetTop() + point.y;
|
MxRect32 b(MxPoint32(p_left2, p_top2), MxSize32(p_width + 1, p_height + 1));
|
||||||
rect2.right = p_left + p_width;
|
|
||||||
rect2.top = p_top;
|
|
||||||
rect2.bottom = p_top + p_height;
|
|
||||||
rect1.right = rect1.left + p_width;
|
|
||||||
rect1.bottom = rect1.top + p_height;
|
|
||||||
|
|
||||||
DDBLTFX data;
|
DDBLTFX data;
|
||||||
memset(&data, 0, sizeof(data));
|
memset(&data, 0, sizeof(data));
|
||||||
data.dwSize = sizeof(data);
|
data.dwSize = sizeof(data);
|
||||||
data.dwDDFX = 8;
|
data.dwDDFX = 8;
|
||||||
|
|
||||||
if (m_ddSurface1->Blt(&rect1, m_ddSurface2, &rect2, 0, &data) == DDERR_SURFACELOST) {
|
if (m_ddSurface1->Blt((LPRECT) &b, m_ddSurface2, (LPRECT) &a, 0, &data) == DDERR_SURFACELOST) {
|
||||||
m_ddSurface1->Restore();
|
m_ddSurface1->Restore();
|
||||||
m_ddSurface1->Blt(&rect1, m_ddSurface2, &rect2, 0, &data);
|
m_ddSurface1->Blt((LPRECT) &b, m_ddSurface2, (LPRECT) &a, 0, &data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue