diff options
author | Marvin Borner | 2021-02-24 15:28:40 +0100 |
---|---|---|
committer | Marvin Borner | 2021-02-24 15:28:40 +0100 |
commit | 6281f580674813e58f083f63031c433393a30129 (patch) | |
tree | ea8587a1abf7097cd30265e7aebf4b79cfcbb810 /libgui | |
parent | e0100f6b98fc3b453d38024f579ead7cf84f581c (diff) |
Awesome indeed
Diffstat (limited to 'libgui')
-rw-r--r-- | libgui/gfx.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libgui/gfx.c b/libgui/gfx.c index 687a883..d9457c7 100644 --- a/libgui/gfx.c +++ b/libgui/gfx.c @@ -211,12 +211,8 @@ void gfx_ctx_on_ctx(struct context *dest, struct context *src, vec2 pos) for (u32 cy = 0; cy < src->size.y && cy + pos.y < dest->size.y; cy++) { int diff = 0; for (u32 cx = 0; cx < src->size.x && cx + pos.x < dest->size.x; cx++) { - if (srcfb[3]) { - destfb[0] = srcfb[0]; - destfb[1] = srcfb[1]; - destfb[2] = srcfb[2]; - destfb[3] = srcfb[3]; - } + if (srcfb[bypp - 1]) + memcpy(destfb, srcfb, bypp); srcfb += bypp; destfb += bypp; |