changeset 1507:1ff64ad478b2

Fixed bug #112 Added SDL_GetKeyRepeat()
author Sam Lantinga <slouken@libsdl.org>
date Mon, 13 Mar 2006 01:41:32 +0000
parents dc057a602e98
children 5100f63122bd
files WhatsNew include/SDL_keyboard.h src/events/SDL_keyboard.c
diffstat 3 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/WhatsNew	Mon Mar 13 01:40:49 2006 +0000
+++ b/WhatsNew	Mon Mar 13 01:41:32 2006 +0000
@@ -3,6 +3,10 @@
 
 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(),
--- a/include/SDL_keyboard.h	Mon Mar 13 01:40:49 2006 +0000
+++ b/include/SDL_keyboard.h	Mon Mar 13 01:41:32 2006 +0000
@@ -84,6 +84,7 @@
  * 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.
--- a/src/events/SDL_keyboard.c	Mon Mar 13 01:40:49 2006 +0000
+++ b/src/events/SDL_keyboard.c	Mon Mar 13 01:41:32 2006 +0000
@@ -569,3 +569,9 @@
 	return(0);
 }
 
+void SDL_GetKeyRepeat(int *delay, int *interval)
+{
+	*delay = SDL_KeyRepeat.delay;
+	*interval = SDL_KeyRepeat.interval;
+}
+