mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix in_availableJoysticks cvar not updating
When in_restart is called or SDL controller added/remove event is received, IN_InitJoystick() tried to update the list but instead of updating the cvar Cvar_Get() just printed a developer message: Warning: cvar "in_availableJoysticks" given initial values: "first joystick ", "first joystick second joystick "
This commit is contained in:
parent
f92c293f7b
commit
84da6537c4
1 changed files with 4 additions and 1 deletions
|
@ -503,7 +503,10 @@ static void IN_InitJoystick( void )
|
||||||
Q_strcat(buf, sizeof(buf), "\n");
|
Q_strcat(buf, sizeof(buf), "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
Cvar_Get( "in_availableJoysticks", buf, CVAR_ROM );
|
Cvar_Get( "in_availableJoysticks", "", CVAR_ROM );
|
||||||
|
|
||||||
|
// Update cvar on in_restart or controller add/remove.
|
||||||
|
Cvar_Set( "in_availableJoysticks", buf );
|
||||||
|
|
||||||
if( !in_joystick->integer ) {
|
if( !in_joystick->integer ) {
|
||||||
Com_DPrintf( "Joystick is not active.\n" );
|
Com_DPrintf( "Joystick is not active.\n" );
|
||||||
|
|
Loading…
Reference in a new issue