mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Allow binds to use hex values for all key codes
This commit is contained in:
parent
33a899d6dd
commit
aab1d92b13
1 changed files with 4 additions and 6 deletions
|
@ -825,6 +825,7 @@ to be configured even if they don't have defined names.
|
||||||
*/
|
*/
|
||||||
int Key_StringToKeynum( char *str ) {
|
int Key_StringToKeynum( char *str ) {
|
||||||
keyname_t *kn;
|
keyname_t *kn;
|
||||||
|
int n;
|
||||||
|
|
||||||
if ( !str || !str[0] ) {
|
if ( !str || !str[0] ) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -834,12 +835,9 @@ int Key_StringToKeynum( char *str ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for hex code
|
// check for hex code
|
||||||
if ( strlen( str ) == 4 ) {
|
n = Com_HexStrToInt( str );
|
||||||
int n = Com_HexStrToInt( str );
|
if ( n >= 0 && n < MAX_KEYS ) {
|
||||||
|
return n;
|
||||||
if ( n >= 0 ) {
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// scan for a text match
|
// scan for a text match
|
||||||
|
|
Loading…
Reference in a new issue