summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/gfxx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/gfxx.c b/bin/gfxx.c
index b72af163..31f97ea1 100644
--- a/bin/gfxx.c
+++ b/bin/gfxx.c
@@ -264,6 +264,13 @@ extern void draw(uint32_t *buf, size_t xres, size_t yres) {
     }
 }
 
+static void samplePalette(void) {
+    size_t temp = scale;
+    scale = 1;
+    draw(palette, 256, 1);
+    scale = temp;
+}
+
 extern void input(char in) {
     size_t pixel = (bits + 7) / 8;
     size_t row = width * bits / 8;
@@ -271,6 +278,7 @@ extern void input(char in) {
         case 'q': printOpts(); exit(EX_OK);
         break; case '[': if (!space--) space = COLOR__MAX - 1;
         break; case ']': if (++space == COLOR__MAX) space = 0;
+        break; case 'p': samplePalette();
         break; case '{': if (bits > 16) bits -= 8; else bits = (bits + 1) / 2;
         break; case '}': if (bits < 16) bits *= 2; else if (bits < 32) bits += 8;
         break; case 'e': endian ^= true;
bdaa19&follow=1'>Bump version.Jason A. Donenfeld 2014-06-29remove debug fprinf() calls that sneaked in with commit 79c985Christian Hesse 2014-06-28git: update to 2.0.1Christian Hesse 2014-06-28ui-patch: Flush stdout after outputting dataJohn Keeping 2014-06-28ui-log: ignore unhandled argumentsJohn Keeping 2014-06-28git: update for git 2.0Christian Hesse 2014-04-17remove trailing whitespaces from source filesChristian Hesse 2014-04-12git: update to 1.9.2Christian Hesse 2014-04-05Fix cgit_parse_url when a repo url is contained in another repo urlJulian Maurice 2014-03-20Makefile: use more reliable git tarball mirrorJason A. Donenfeld 2014-03-20git: update to 1.9.1Christian Hesse