From 3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0 Mon Sep 17 00:00:00 2001 From: rodri Date: Fri, 2 Aug 2024 16:04:54 +0000 Subject: fb: fix the destination drawing rectangle. --- fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fb.c b/fb.c index 2cf05da..4806604 100644 --- a/fb.c +++ b/fb.c @@ -99,7 +99,7 @@ framebufctl_draw(Framebufctl *ctl, Image *dst) qlock(ctl); fb = ctl->getfb(ctl); - loadimage(dst, dst->r, (uchar*)fb->cb, Dx(fb->r)*Dy(fb->r)*4); + loadimage(dst, rectaddpt(fb->r, dst->r.min), (uchar*)fb->cb, Dx(fb->r)*Dy(fb->r)*4); qunlock(ctl); } @@ -149,7 +149,7 @@ framebufctl_memdraw(Framebufctl *ctl, Memimage *dst) qlock(ctl); fb = ctl->getfb(ctl); - loadmemimage(dst, dst->r, (uchar*)fb->cb, Dx(fb->r)*Dy(fb->r)*4); + loadmemimage(dst, rectaddpt(fb->r, dst->r.min), (uchar*)fb->cb, Dx(fb->r)*Dy(fb->r)*4); qunlock(ctl); } -- cgit v1.2.3