mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 12:11:34 +00:00
Bound keys not saved in quotes fix, this caused problems with a binded semilicon
This commit is contained in:
parent
af1a000fb1
commit
ac7199d6e2
1 changed files with 58 additions and 45 deletions
|
@ -212,7 +212,8 @@ keyname_t keynames[] =
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
qboolean CheckForCommand (void)
|
||||
qboolean
|
||||
CheckForCommand ( void )
|
||||
{
|
||||
char command[128];
|
||||
char *cmd, *s;
|
||||
|
@ -235,7 +236,8 @@ qboolean CheckForCommand (void)
|
|||
return true;
|
||||
}
|
||||
|
||||
void CompleteCommand (void)
|
||||
void
|
||||
CompleteCommand ( void )
|
||||
{
|
||||
char *cmd, *s;
|
||||
|
||||
|
@ -265,7 +267,8 @@ Key_Console
|
|||
Interactive line editing and console scrollback
|
||||
====================
|
||||
*/
|
||||
void Key_Console (int key)
|
||||
void
|
||||
Key_Console ( int key )
|
||||
{
|
||||
int i;
|
||||
#ifdef _WIN32
|
||||
|
@ -444,7 +447,8 @@ qboolean chat_team;
|
|||
char chat_buffer[MAXCMDLINE];
|
||||
int chat_bufferlen = 0;
|
||||
|
||||
void Key_Message (int key)
|
||||
void
|
||||
Key_Message ( int key )
|
||||
{
|
||||
|
||||
if (key == K_ENTER)
|
||||
|
@ -502,7 +506,8 @@ the given string. Single ascii characters return themselves, while
|
|||
the K_* names are matched up.
|
||||
===================
|
||||
*/
|
||||
int Key_StringToKeynum (char *str)
|
||||
int
|
||||
Key_StringToKeynum ( char *str )
|
||||
{
|
||||
keyname_t *kn;
|
||||
|
||||
|
@ -528,7 +533,8 @@ given keynum.
|
|||
FIXME: handle quote special (general escape sequence?)
|
||||
===================
|
||||
*/
|
||||
char *Key_KeynumToString (int keynum)
|
||||
char *
|
||||
Key_KeynumToString ( int keynum )
|
||||
{
|
||||
keyname_t *kn;
|
||||
static char tinystr[2];
|
||||
|
@ -555,7 +561,8 @@ char *Key_KeynumToString (int keynum)
|
|||
Key_SetBinding
|
||||
===================
|
||||
*/
|
||||
void Key_SetBinding (int keynum, char *binding)
|
||||
void
|
||||
Key_SetBinding ( int keynum, char *binding )
|
||||
{
|
||||
char *new;
|
||||
int l;
|
||||
|
@ -583,7 +590,8 @@ void Key_SetBinding (int keynum, char *binding)
|
|||
Key_Unbind_f
|
||||
===================
|
||||
*/
|
||||
void Key_Unbind_f (void)
|
||||
void
|
||||
Key_Unbind_f ( void )
|
||||
{
|
||||
int b;
|
||||
|
||||
|
@ -603,7 +611,8 @@ void Key_Unbind_f (void)
|
|||
Key_SetBinding (b, "");
|
||||
}
|
||||
|
||||
void Key_Unbindall_f (void)
|
||||
void
|
||||
Key_Unbindall_f ( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -618,7 +627,8 @@ void Key_Unbindall_f (void)
|
|||
Key_Bind_f
|
||||
===================
|
||||
*/
|
||||
void Key_Bind_f (void)
|
||||
void
|
||||
Key_Bind_f ( void )
|
||||
{
|
||||
int i, c, b;
|
||||
char cmd[1024];
|
||||
|
@ -665,13 +675,14 @@ Key_WriteBindings
|
|||
Writes lines containing "bind key value"
|
||||
============
|
||||
*/
|
||||
void Key_WriteBindings (FILE *f)
|
||||
void
|
||||
Key_WriteBindings ( FILE *f )
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<256 ; i++)
|
||||
if (keybindings[i])
|
||||
fprintf (f, "bind %s \"%s\"\n", Key_KeynumToString(i), keybindings[i]);
|
||||
fprintf (f, "bind \"%s\" \"%s\"\n", Key_KeynumToString(i), keybindings[i]); // 1999-12-26 bound keys not saved in quotes fix by Maddes
|
||||
}
|
||||
|
||||
|
||||
|
@ -680,7 +691,8 @@ void Key_WriteBindings (FILE *f)
|
|||
Key_Init
|
||||
===================
|
||||
*/
|
||||
void Key_Init (void)
|
||||
void
|
||||
Key_Init ( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -764,7 +776,8 @@ Called by the system between frames for both key up and key down events
|
|||
Should NOT be called during an interrupt!
|
||||
===================
|
||||
*/
|
||||
void Key_Event (int key, qboolean down)
|
||||
void
|
||||
Key_Event ( int key, qboolean down )
|
||||
{
|
||||
char *kb;
|
||||
char cmd[1024];
|
||||
|
@ -919,7 +932,8 @@ void Key_Event (int key, qboolean down)
|
|||
Key_ClearStates
|
||||
===================
|
||||
*/
|
||||
void Key_ClearStates (void)
|
||||
void
|
||||
Key_ClearStates ( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -929,4 +943,3 @@ void Key_ClearStates (void)
|
|||
key_repeats[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue