mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +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
|
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 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 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
|
- 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, use_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
CVAR (Bool, m_noprescale, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR (Bool, m_noprescale, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
CVAR (Bool, m_filter, 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];
|
float JoyAxes[6];
|
||||||
//static int JoyActive;
|
//static int JoyActive;
|
||||||
|
@ -200,6 +201,10 @@ static void InitKeySymMap ()
|
||||||
static void I_CheckGUICapture ()
|
static void I_CheckGUICapture ()
|
||||||
{
|
{
|
||||||
bool wantCapt;
|
bool wantCapt;
|
||||||
|
bool repeat;
|
||||||
|
int oldrepeat, interval;
|
||||||
|
|
||||||
|
SDL_GetKeyRepeat(&oldrepeat, &interval);
|
||||||
|
|
||||||
if (menuactive == MENU_Off)
|
if (menuactive == MENU_Off)
|
||||||
{
|
{
|
||||||
|
@ -217,15 +222,34 @@ static void I_CheckGUICapture ()
|
||||||
{
|
{
|
||||||
FlushDIKState ();
|
FlushDIKState ();
|
||||||
memset (DownState, 0, sizeof(DownState));
|
memset (DownState, 0, sizeof(DownState));
|
||||||
SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
repeat = !sdl_nokeyrepeat;
|
||||||
SDL_EnableUNICODE (1);
|
SDL_EnableUNICODE (1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SDL_EnableKeyRepeat (0, 0);
|
repeat = false;
|
||||||
SDL_EnableUNICODE (0);
|
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 ()
|
static void CenterMouse ()
|
||||||
|
|
Loading…
Reference in a new issue