From 66c623f3af051dbbe956bfa6f243817f86cd453b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 13 Mar 2006 01:41:32 +0000 Subject: [PATCH] Fixed bug #112 Added SDL_GetKeyRepeat() --- WhatsNew | 4 ++++ include/SDL_keyboard.h | 1 + src/events/SDL_keyboard.c | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/WhatsNew b/WhatsNew index 1455119ed..9ac90f771 100644 --- a/WhatsNew +++ b/WhatsNew @@ -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(), diff --git a/include/SDL_keyboard.h b/include/SDL_keyboard.h index 1e9635897..1ad7dcaa4 100644 --- a/include/SDL_keyboard.h +++ b/include/SDL_keyboard.h @@ -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. diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index 9cc6036c0..ff1c95d19 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -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; +} +