summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-02-02 20:32:26 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-02-02 20:32:26 +0100
commit223af1001785eb71b9a02f70cf8d1a6c3bdbbcf5 (patch)
tree67f411dba5056950085ae84fed000d0f4a56c15c
parent69958aac5609d86db5d3f140f514c96eb6023600 (diff)
downloadglslview-223af1001785eb71b9a02f70cf8d1a6c3bdbbcf5.tar
glslview-223af1001785eb71b9a02f70cf8d1a6c3bdbbcf5.zip
Add support for running backwards
-rw-r--r--glslview.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/glslview.c b/glslview.c
index 26c9f22..730032b 100644
--- a/glslview.c
+++ b/glslview.c
@@ -261,7 +261,20 @@ static void handle_input(const char *input) {
break;
case '=':
- speed = 1.0;
+ if (speed < 0)
+ speed = -1.0;
+ else
+ speed = 1.0;
+ break;
+
+ case '<':
+ if (speed > 0)
+ speed = -speed;
+ break;
+
+ case '>':
+ if (speed < 0)
+ speed = -speed;
}
}
}