aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2011-05-23 02:11:48 +0000
committerDimitri Sokolyuk <demon@dim13.org>2011-05-23 02:11:48 +0000
commit369c7a0af8aefc6574254f584a76bae25eb51a91 (patch)
treeb9015a0f39d52acc7f3d5f0d81df8ca0ed2e6b7f
parentb7983d1e2fe60e80153d1511dcc7341248885359 (diff)
get rid of contact chatter
-rw-r--r--spectrogram.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/spectrogram.c b/spectrogram.c
index b5d1a2e..e7276d2 100644
--- a/spectrogram.c
+++ b/spectrogram.c
@@ -313,6 +313,7 @@ main(int argc, char **argv)
int height = 0;
int width = 0;
int sdlargs;
+ int pressed = 0;
#if TIMING
@@ -429,14 +430,20 @@ main(int argc, char **argv)
die = 1;
break;
case SDLK_l:
- flip_left ^= 1;
+ if (!pressed)
+ flip_left ^= 1;
break;
case SDLK_r:
- flip_right ^= 1;
+ if (!pressed)
+ flip_right ^= 1;
break;
default:
break;
}
+ pressed = 1;
+ break;
+ case SDL_KEYUP:
+ pressed = 0;
break;
}
#if TIMING