mirror of
https://github.com/yawut/SDL.git
synced 2026-08-24 01:35:39 -05:00
Key repeat is handled by the OS, since text input is now decoupled from physical key events.
This commit is contained in:
@@ -64,6 +64,9 @@ extern "C" {
|
||||
#define SDL_BUTTON_WHEELUP 4
|
||||
#define SDL_BUTTON_WHEELDOWN 5
|
||||
|
||||
#define SDL_DEFAULT_REPEAT_DELAY 500
|
||||
#define SDL_DEFAULT_REPEAT_INTERVAL 30
|
||||
|
||||
typedef struct SDL_VideoInfo
|
||||
{
|
||||
Uint32 hw_available:1;
|
||||
@@ -173,6 +176,8 @@ extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
|
||||
SDL_Rect * dstrect);
|
||||
extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
|
||||
extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
|
||||
extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
|
||||
extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -92,32 +92,6 @@ extern DECLSPEC int SDLCALL SDL_SelectKeyboard(int index);
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
|
||||
|
||||
/**
|
||||
* \fn int SDL_EnableKeyRepeat(int delay, int interval)
|
||||
*
|
||||
* \brief Enable keyboard repeat for the selected keyboard.
|
||||
*
|
||||
* \param delay The initial delay in milliseconds between the time when a
|
||||
* key is pressed and keyboard repeat begins. Setting a delay
|
||||
* of 0 will disable keyboard repeat.
|
||||
* \param interval The time in milliseconds between keyboard repeat events.
|
||||
*
|
||||
* \return 0 on success, or -1 if there was an error.
|
||||
*
|
||||
* \note Keyboard repeat defaults to off.
|
||||
*/
|
||||
#define SDL_DEFAULT_REPEAT_DELAY 500
|
||||
#define SDL_DEFAULT_REPEAT_INTERVAL 30
|
||||
/**/
|
||||
extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
|
||||
|
||||
/**
|
||||
* \fn void SDL_GetKeyRepeat(int *delay, int *interval)
|
||||
*
|
||||
* \brief Get the current keyboard repeat setting for the selected keyboard.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
|
||||
|
||||
/**
|
||||
* \fn Uint8 *SDL_GetKeyState(int *numkeys)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user