Fixed bug #112
authorSam Lantinga <slouken@libsdl.org>
Mon, 13 Mar 2006 01:41:32 +0000
changeset 15071ff64ad478b2
parent 1506 dc057a602e98
child 1508 5100f63122bd
Fixed bug #112
Added SDL_GetKeyRepeat()
WhatsNew
include/SDL_keyboard.h
src/events/SDL_keyboard.c
     1.1 --- a/WhatsNew	Mon Mar 13 01:40:49 2006 +0000
     1.2 +++ b/WhatsNew	Mon Mar 13 01:41:32 2006 +0000
     1.3 @@ -3,6 +3,10 @@
     1.4  
     1.5  Version 1.0:
     1.6  
     1.7 +1.2.10:
     1.8 +	Added SDL_GetKeyRepeat()
     1.9 +	Added SDL_config.h, with defaults for various build environments.
    1.10 +
    1.11  1.2.7:
    1.12  	Added CPU feature detection functions to SDL_cpuinfo.h:
    1.13  		SDL_HasRDTSC(), SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE(),
     2.1 --- a/include/SDL_keyboard.h	Mon Mar 13 01:40:49 2006 +0000
     2.2 +++ b/include/SDL_keyboard.h	Mon Mar 13 01:41:32 2006 +0000
     2.3 @@ -84,6 +84,7 @@
     2.4   * If 'delay' is set to 0, keyboard repeat is disabled.
     2.5   */
     2.6  extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
     2.7 +extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
     2.8  
     2.9  /*
    2.10   * Get a snapshot of the current state of the keyboard.
     3.1 --- a/src/events/SDL_keyboard.c	Mon Mar 13 01:40:49 2006 +0000
     3.2 +++ b/src/events/SDL_keyboard.c	Mon Mar 13 01:41:32 2006 +0000
     3.3 @@ -569,3 +569,9 @@
     3.4  	return(0);
     3.5  }
     3.6  
     3.7 +void SDL_GetKeyRepeat(int *delay, int *interval)
     3.8 +{
     3.9 +	*delay = SDL_KeyRepeat.delay;
    3.10 +	*interval = SDL_KeyRepeat.interval;
    3.11 +}
    3.12 +