diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-02-02 20:32:26 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-02-02 20:32:26 +0100 |
commit | 223af1001785eb71b9a02f70cf8d1a6c3bdbbcf5 (patch) | |
tree | 67f411dba5056950085ae84fed000d0f4a56c15c | |
parent | 69958aac5609d86db5d3f140f514c96eb6023600 (diff) | |
download | glslview-223af1001785eb71b9a02f70cf8d1a6c3bdbbcf5.tar glslview-223af1001785eb71b9a02f70cf8d1a6c3bdbbcf5.zip |
Add support for running backwards
-rw-r--r-- | glslview.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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; } } } |