mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Added sdl_nokeyrepeat to disable key repeating in the menus and console
on Linux. SVN r1470 (trunk)
This commit is contained in:
parent
1e57e07926
commit
fcdab6a777
2 changed files with 28 additions and 2 deletions
|
@ -1,4 +1,6 @@
|
|||
March 10, 2009
|
||||
- Added sdl_nokeyrepeat to disable key repeating in the menus and console
|
||||
on Linux.
|
||||
- Added support for zip/pk3 files with LZMA and bzip2 compression to ZDoom.
|
||||
- Added more output to zipdir and a -q option to turn it off.
|
||||
- Added -u option to zipdir to only recompress those files in a zip that have
|
||||
|
|
|
@ -29,6 +29,7 @@ extern int paused;
|
|||
CVAR (Bool, use_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Bool, m_noprescale, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Bool, m_filter, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR (Bool, sdl_nokeyrepeat, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
||||
float JoyAxes[6];
|
||||
//static int JoyActive;
|
||||
|
@ -200,6 +201,10 @@ static void InitKeySymMap ()
|
|||
static void I_CheckGUICapture ()
|
||||
{
|
||||
bool wantCapt;
|
||||
bool repeat;
|
||||
int oldrepeat, interval;
|
||||
|
||||
SDL_GetKeyRepeat(&oldrepeat, &interval);
|
||||
|
||||
if (menuactive == MENU_Off)
|
||||
{
|
||||
|
@ -217,15 +222,34 @@ static void I_CheckGUICapture ()
|
|||
{
|
||||
FlushDIKState ();
|
||||
memset (DownState, 0, sizeof(DownState));
|
||||
SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||
repeat = !sdl_nokeyrepeat;
|
||||
SDL_EnableUNICODE (1);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_EnableKeyRepeat (0, 0);
|
||||
repeat = false;
|
||||
SDL_EnableUNICODE (0);
|
||||
}
|
||||
}
|
||||
if (wantCapt)
|
||||
{
|
||||
repeat = !sdl_nokeyrepeat;
|
||||
}
|
||||
else
|
||||
{
|
||||
repeat = false;
|
||||
}
|
||||
if (repeat != (oldrepeat != 0))
|
||||
{
|
||||
if (repeat)
|
||||
{
|
||||
SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_EnableKeyRepeat (0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void CenterMouse ()
|
||||
|
|
Loading…
Reference in a new issue