changeset 122:8f33e95b43b6

Don't worry about a minimum repeat rate - let the user hang themselves...
author Sam Lantinga <slouken@libsdl.org>
date Mon, 23 Jul 2001 04:34:52 +0000
parents 43febd46d49d
children d49e9d023119
files src/events/SDL_keyboard.c
diffstat 1 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/events/SDL_keyboard.c	Mon Jul 23 02:58:42 2001 +0000
+++ b/src/events/SDL_keyboard.c	Mon Jul 23 04:34:52 2001 +0000
@@ -49,7 +49,6 @@
 /*
  * jk 991215 - added
  */
-#define MINIMUM_REPEAT_INTERVAL	30	/* Minimum repeat interval (30 ms) */
 struct {
 	int firsttime;    /* if we check against the delay or repeat value */
 	int delay;        /* the delay before we start repeating */
@@ -556,17 +555,13 @@
 
 int SDL_EnableKeyRepeat(int delay, int interval)
 {
-	if ( delay < 0 ) {
-		SDL_SetError("keyboard repeat delay less than zero");
+	if ( (delay < 0) || (interval < 0) ) {
+		SDL_SetError("keyboard repeat value less than zero");
 		return(-1);
 	}
 	SDL_KeyRepeat.firsttime = 0;
 	SDL_KeyRepeat.delay = delay;
-	if ( interval < MINIMUM_REPEAT_INTERVAL ) {
-		SDL_KeyRepeat.interval = MINIMUM_REPEAT_INTERVAL;
-	} else {
-		SDL_KeyRepeat.interval = interval;
-	}
+	SDL_KeyRepeat.interval = interval;
 	SDL_KeyRepeat.timestamp = 0;
 	return(0);
 }