mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2024-11-22 08:50:18 +01:00
Fixed off-by-one error in background blit.
This commit is contained in:
parent
60e9f63607
commit
86eaad5b79
1 changed files with 4 additions and 4 deletions
|
@ -326,13 +326,13 @@ void gdrv::blat(gdrv_bitmap8* bmp, int xDest, int yDest)
|
||||||
GetClientRect(hwnd, &client);
|
GetClientRect(hwnd, &client);
|
||||||
if (fullscrn::OffsetX > 0)
|
if (fullscrn::OffsetX > 0)
|
||||||
{
|
{
|
||||||
BitBlt(dc, 0, 0, fullscrn::OffsetX, client.bottom, dc, 0, 0, rop);
|
BitBlt(dc, 0, 0, min(fullscrn::OffsetX + 2, client.right), client.bottom, dc, 0, 0, rop);
|
||||||
BitBlt(dc, client.right - fullscrn::OffsetX, 0, client.right, client.bottom, dc, 0, 0, rop);
|
BitBlt(dc, max(client.right - fullscrn::OffsetX - 2, 0), 0, client.right, client.bottom, dc, 0, 0, rop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BitBlt(dc, 0, 0, client.right, fullscrn::OffsetY, dc, 0, 0, rop);
|
BitBlt(dc, 0, 0, client.right, min(fullscrn::OffsetY + 2, client.bottom), dc, 0, 0, rop);
|
||||||
BitBlt(dc, 0, client.bottom - fullscrn::OffsetY, client.right, client.bottom, dc, 0, 0, rop);
|
BitBlt(dc, 0, max(client.bottom - fullscrn::OffsetY - 2, 0), client.right, client.bottom, dc, 0, 0, rop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue