mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-07 14:18:04 +03:00
Add SetAutoRepeat impl for SDL
This commit is contained in:
@@ -94,6 +94,7 @@ extern boolean sdl_cursorNew(BYTE* data, int no, CursorImage *cursorImage, TCur
|
||||
extern int sdl_getKeyInfo();
|
||||
extern int sdl_getMouseInfo(MyPoint *p);
|
||||
extern int sdl_getjoyinfo(void);
|
||||
extern void sdl_setAutoRepeat(boolean bool);
|
||||
|
||||
/* misc */
|
||||
extern void sdl_mainIteration();
|
||||
@@ -162,6 +163,7 @@ extern boolean RawKeyInfo[];
|
||||
#define Keywait(r,flg) sdl_keywait(r,flg)
|
||||
#define SetCursorLocation(x,y) sdl_setCursorLocation((x),(y))
|
||||
#define CursorNew(d,no,i,dir) sdl_cursorNew((d),(no),(i),(dir))
|
||||
#define SetAutoRepeat(b) sdl_setAutoRepeat(b)
|
||||
|
||||
/* misc */
|
||||
#define ResourceInit(c,v) sdl_ResourceInit((c),(v))
|
||||
|
||||
@@ -212,3 +212,11 @@ agsurface_t *sdl_getDIB(void) {
|
||||
return sdl_dibinfo;
|
||||
}
|
||||
|
||||
/* AutoRepeat の設定 */
|
||||
void sdl_setAutoRepeat(boolean bool) {
|
||||
if (bool) {
|
||||
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||
} else {
|
||||
SDL_EnableKeyRepeat(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user