Fix height of controller settings with exactly 1 controller

The controller name is also shown if there is only exactly one controller connected, but the height was not increased for the additional row.
This commit is contained in:
Robert Müller 2024-05-11 15:10:12 +02:00
parent d34fc96049
commit b8cb67379c

View file

@ -1066,12 +1066,9 @@ float CMenus::RenderSettingsControlsJoystick(CUIRect View)
int NumOptions = 1; // expandable header int NumOptions = 1; // expandable header
if(JoystickEnabled) if(JoystickEnabled)
{ {
if(NumJoysticks == 0) NumOptions++; // message or joystick name/selection
NumOptions++; // message if(NumJoysticks > 0)
else
{ {
if(NumJoysticks > 1)
NumOptions++; // joystick selection
NumOptions += 3; // mode, ui sens, tolerance NumOptions += 3; // mode, ui sens, tolerance
if(!g_Config.m_InpControllerAbsolute) if(!g_Config.m_InpControllerAbsolute)
NumOptions++; // ingame sens NumOptions++; // ingame sens