mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 01:42:12 +00:00
Consider key states before startup, patch by Zack Middleton (#4950)
This commit is contained in:
parent
e5c210236c
commit
6b82f4fd09
2 changed files with 23 additions and 2 deletions
|
@ -980,6 +980,20 @@ void IN_Frame( void )
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
IN_InitKeyLockStates
|
||||
===============
|
||||
*/
|
||||
void IN_InitKeyLockStates( void )
|
||||
{
|
||||
unsigned char *keystate = SDL_GetKeyState(NULL);
|
||||
|
||||
keys[K_SCROLLOCK].down = keystate[SDLK_SCROLLOCK];
|
||||
keys[K_KP_NUMLOCK].down = keystate[SDLK_NUMLOCK];
|
||||
keys[K_CAPSLOCK].down = keystate[SDLK_CAPSLOCK];
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
IN_Init
|
||||
|
@ -1030,6 +1044,8 @@ void IN_Init( void )
|
|||
Cvar_SetValue( "com_unfocused", !( appState & SDL_APPINPUTFOCUS ) );
|
||||
Cvar_SetValue( "com_minimized", !( appState & SDL_APPACTIVE ) );
|
||||
|
||||
IN_InitKeyLockStates( );
|
||||
|
||||
IN_InitJoystick( );
|
||||
Com_DPrintf( "------------------------------------\n" );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue