pinosaur
/
smdp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
605e481
)
handle fading on undefined key press correctly
author
Michael Göhler
<somebody.here@gmx.de>
Mon, 1 Sep 2014 21:51:22 +0000
(23:51 +0200)
committer
Michael Göhler
<somebody.here@gmx.de>
Mon, 1 Sep 2014 21:51:22 +0000
(23:51 +0200)
viewer.c
patch
|
blob
|
history
diff --git
a/viewer.c
b/viewer.c
index
6dac23b
..
a6cf53c
100644
(file)
--- a/
viewer.c
+++ b/
viewer.c
@@
-172,6
+172,9
@@
int ncurses_display(deck_t *deck, int notrans, int nofade) {
if(fade)
fade_in(content, trans, colors);
+ // re-enable fading after any undefined key press
+ if(COLORS == 256 && !nofade) fade = 1;
+
// wait for user input
c = getch();
@@
-207,6
+210,11
@@
int ncurses_display(deck_t *deck, int notrans, int nofade) {
fade = 0;
slide = (void*)0;
break;
+
+ default:
+ // disable fading on undefined key press
+ fade = 0;
+ break;
}
// fade out