src/events/SDL_keyboard.c
changeset 122 8f33e95b43b6
parent 14 c3e9d4a623c1
child 184 3142d2ac11db
     1.1 --- a/src/events/SDL_keyboard.c	Mon Jul 23 02:58:42 2001 +0000
     1.2 +++ b/src/events/SDL_keyboard.c	Mon Jul 23 04:34:52 2001 +0000
     1.3 @@ -49,7 +49,6 @@
     1.4  /*
     1.5   * jk 991215 - added
     1.6   */
     1.7 -#define MINIMUM_REPEAT_INTERVAL	30	/* Minimum repeat interval (30 ms) */
     1.8  struct {
     1.9  	int firsttime;    /* if we check against the delay or repeat value */
    1.10  	int delay;        /* the delay before we start repeating */
    1.11 @@ -556,17 +555,13 @@
    1.12  
    1.13  int SDL_EnableKeyRepeat(int delay, int interval)
    1.14  {
    1.15 -	if ( delay < 0 ) {
    1.16 -		SDL_SetError("keyboard repeat delay less than zero");
    1.17 +	if ( (delay < 0) || (interval < 0) ) {
    1.18 +		SDL_SetError("keyboard repeat value less than zero");
    1.19  		return(-1);
    1.20  	}
    1.21  	SDL_KeyRepeat.firsttime = 0;
    1.22  	SDL_KeyRepeat.delay = delay;
    1.23 -	if ( interval < MINIMUM_REPEAT_INTERVAL ) {
    1.24 -		SDL_KeyRepeat.interval = MINIMUM_REPEAT_INTERVAL;
    1.25 -	} else {
    1.26 -		SDL_KeyRepeat.interval = interval;
    1.27 -	}
    1.28 +	SDL_KeyRepeat.interval = interval;
    1.29  	SDL_KeyRepeat.timestamp = 0;
    1.30  	return(0);
    1.31  }