mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-11 10:11:47 +00:00
input: Add a function Key_GameKey to separate the input driver layer a bit more.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1029 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
387c467cbe
commit
3a0f3c6b5b
3 changed files with 13 additions and 2 deletions
|
@ -258,7 +258,7 @@ void IN_Deactivate (qboolean free_cursor)
|
||||||
|
|
||||||
void IN_Init (void)
|
void IN_Init (void)
|
||||||
{
|
{
|
||||||
prev_gamekey = ((key_dest == key_game && !con_forcedup) || m_keys_bind_grab);
|
prev_gamekey = Key_GameKey();
|
||||||
|
|
||||||
#if !defined(USE_SDL2)
|
#if !defined(USE_SDL2)
|
||||||
SDL_EnableUNICODE (!prev_gamekey);
|
SDL_EnableUNICODE (!prev_gamekey);
|
||||||
|
@ -352,7 +352,7 @@ void IN_ClearStates (void)
|
||||||
|
|
||||||
void IN_UpdateForKeydest (void)
|
void IN_UpdateForKeydest (void)
|
||||||
{
|
{
|
||||||
gamekey = ((key_dest == key_game && !con_forcedup) || m_keys_bind_grab);
|
gamekey = Key_GameKey();
|
||||||
if (gamekey != prev_gamekey)
|
if (gamekey != prev_gamekey)
|
||||||
{
|
{
|
||||||
prev_gamekey = gamekey;
|
prev_gamekey = gamekey;
|
||||||
|
|
|
@ -1117,6 +1117,16 @@ void Key_UpdateForDest (void)
|
||||||
IN_UpdateForKeydest ();
|
IN_UpdateForKeydest ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
===================
|
||||||
|
Key_GameKey
|
||||||
|
===================
|
||||||
|
*/
|
||||||
|
qboolean Key_GameKey(void)
|
||||||
|
{
|
||||||
|
return ((key_dest == key_game && !con_forcedup) || m_keys_bind_grab);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
===================
|
===================
|
||||||
Key_ConsoleBindable
|
Key_ConsoleBindable
|
||||||
|
|
|
@ -163,6 +163,7 @@ extern qboolean chat_team;
|
||||||
void Key_Init (void);
|
void Key_Init (void);
|
||||||
void Key_ClearStates (void);
|
void Key_ClearStates (void);
|
||||||
void Key_UpdateForDest (void);
|
void Key_UpdateForDest (void);
|
||||||
|
qboolean Key_GameKey (void);
|
||||||
qboolean Key_ConsoleBindable (int key);
|
qboolean Key_ConsoleBindable (int key);
|
||||||
|
|
||||||
void Key_Event (int key, qboolean down);
|
void Key_Event (int key, qboolean down);
|
||||||
|
|
Loading…
Reference in a new issue