mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
Fix blit bleed for windows with x() < 0.
This commit is contained in:
parent
659c54e32b
commit
baec8925a8
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ void FrameBufferSDL::blit(const Point& position, GraphicsBitmap& bitmap)
|
||||||
for (int y = 0; y < dst_rect.height(); ++y) {
|
for (int y = 0; y < dst_rect.height(); ++y) {
|
||||||
auto* framebuffer_scanline = scanline(position.y() + y);
|
auto* framebuffer_scanline = scanline(position.y() + y);
|
||||||
auto* bitmap_scanline = bitmap.scanline(y);
|
auto* bitmap_scanline = bitmap.scanline(y);
|
||||||
memcpy(framebuffer_scanline + position.x(), bitmap_scanline, dst_rect.width() * 4);
|
memcpy(framebuffer_scanline + dst_rect.x(), bitmap_scanline + (dst_rect.x() - position.x()), dst_rect.width() * 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue