diff options
author | Marvin Borner | 2020-09-13 15:34:17 +0200 |
---|---|---|
committer | Marvin Borner | 2020-09-13 15:34:17 +0200 |
commit | 18a0cc60d46d8ab22479e9683c27459703195480 (patch) | |
tree | 6a4d79aea8fa3bf5d331baba3478d14e7394a22d /libgui/gui.c | |
parent | 0ff95a565280241a4b9cc03840d8756180860b25 (diff) |
Added window scaling
Diffstat (limited to 'libgui/gui.c')
-rw-r--r-- | libgui/gui.c | 5 |
1 files changed, 5 insertions, 0 deletions
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]; |