Skip to content

Commit

Permalink
Fixed bug #112
Browse files Browse the repository at this point in the history
Added SDL_GetKeyRepeat()
  • Loading branch information
slouken committed Mar 13, 2006
1 parent 889f8a3 commit 66c623f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WhatsNew
Expand Up @@ -3,6 +3,10 @@ This is a list of API changes in SDL's version history.

Version 1.0:

1.2.10:
Added SDL_GetKeyRepeat()
Added SDL_config.h, with defaults for various build environments.

1.2.7:
Added CPU feature detection functions to SDL_cpuinfo.h:
SDL_HasRDTSC(), SDL_HasMMX(), SDL_Has3DNow(), SDL_HasSSE(),
Expand Down
1 change: 1 addition & 0 deletions include/SDL_keyboard.h
Expand Up @@ -84,6 +84,7 @@ extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
* If 'delay' is set to 0, keyboard repeat is disabled.
*/
extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);

/*
* Get a snapshot of the current state of the keyboard.
Expand Down
6 changes: 6 additions & 0 deletions src/events/SDL_keyboard.c
Expand Up @@ -569,3 +569,9 @@ int SDL_EnableKeyRepeat(int delay, int interval)
return(0);
}

void SDL_GetKeyRepeat(int *delay, int *interval)
{
*delay = SDL_KeyRepeat.delay;
*interval = SDL_KeyRepeat.interval;
}

0 comments on commit 66c623f

Please sign in to comment.