FULLPIPE: Fixed off-screen bitmap rendering

This commit is contained in:
Eugene Sandulenko
2013-09-06 14:51:21 +03:00
parent f1eb4043c2
commit 0daaadc604
+6 -4
View File
@@ -783,16 +783,18 @@ void Bitmap::putDibCB(int32 *palette) {
byte *srcPtr = &_pixels[pitch * (endy - _y)];
int starty = _y;
if (starty < 0) {
starty = 0;
srcPtr = &_pixels[pitch * (_height + _y)];
}
int startx = _x;
if (startx < 0) {
srcPtr += bpp * -_x;
startx = 0;
}
int starty = _y;
if (starty < 0)
starty = 0;
if (_flags & 0x1000000) {
for (int y = starty; y < endy; srcPtr -= pitch, y++) {
curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(startx, y);