From 18a0cc60d46d8ab22479e9683c27459703195480 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 13 Sep 2020 15:34:17 +0200 Subject: Added window scaling --- libgui/gui.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libgui/gui.c') diff --git a/libgui/gui.c b/libgui/gui.c index 486fe8e..9744f75 100644 --- a/libgui/gui.c +++ b/libgui/gui.c @@ -111,6 +111,11 @@ void gui_win_on_win(struct window *dest, struct window *src, int x, int y) return; } + if (x < 0) + x = 0; + if (y < 0) + y = 0; + int bypp = dest->bpp >> 3; u8 *srcfb = src->fb; u8 *destfb = &dest->fb[x * bypp + y * dest->pitch]; -- cgit v1.2.3