summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bin/gfb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/gfb.c b/bin/gfb.c
index 1cd56ac8..3606bb05 100644
--- a/bin/gfb.c
+++ b/bin/gfb.c
@@ -19,6 +19,7 @@
 #include <linux/fb.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sysexits.h>
@@ -75,8 +76,10 @@ int main(int argc, char *argv[]) {
     error = tcsetattr(STDERR_FILENO, TCSADRAIN, &term);
     if (error) err(EX_IOERR, "tcsetattr");
 
+    uint32_t back[info.xres * info.yres];
     for (;;) {
-        draw(buf, info.xres, info.yres);
+        draw(back, info.xres, info.yres);
+        memcpy(buf, back, size);
 
         char in;
         ssize_t len = read(STDERR_FILENO, &in, 1);
ommit/install.sh?id=9e1bed8297a7a18baaccdb8b7007d6daaa155457&follow=1'>Install bc(1) on ArchJune McEnroe 2018-09-02SendEnv LANGJune McEnroe 2018-08-27Add New Order — TemptationJune McEnroe 2018-08-26Add NetBSD to install.shJune McEnroe 2018-08-24Show hostname in title over SSHJune McEnroe 2018-08-23Alias bc='bc -l'June McEnroe 2018-08-20Update usage of scheme in READMEJune McEnroe 2018-08-20Use scheme.h in fbatt and fbclockJune McEnroe 2018-08-20Generate scheme.hJune McEnroe 2018-08-20Add dependencies on gfx.hJune McEnroe 2018-08-18Add Blondie — Heart of GlassJune McEnroe 2018-08-18Set FCEDIT=$EDITORJune McEnroe 2018-08-18Only post commits with bodies to MastodonJune McEnroe 2018-08-18Run tf/cfg link script with /bin/shJune McEnroe 2018-08-18Run {,s,t}up with /bin/shJune McEnroe 2018-08-18Use whence instead of typeJune McEnroe 2018-08-18Cut off path components until right prompt fitsJune McEnroe 2018-08-17Add "private" alias to source encrypted fileJune McEnroe 2018-08-17Add vim mapping to add a #includeJune McEnroe