From b8cb67379cc4523a9817af750b19cfc0d8f722f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sat, 11 May 2024 15:10:12 +0200 Subject: [PATCH] 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. --- src/game/client/components/menus_settings.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index acc036b8c..b5339dafb 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -1066,12 +1066,9 @@ float CMenus::RenderSettingsControlsJoystick(CUIRect View) int NumOptions = 1; // expandable header if(JoystickEnabled) { - if(NumJoysticks == 0) - NumOptions++; // message - else + NumOptions++; // message or joystick name/selection + if(NumJoysticks > 0) { - if(NumJoysticks > 1) - NumOptions++; // joystick selection NumOptions += 3; // mode, ui sens, tolerance if(!g_Config.m_InpControllerAbsolute) NumOptions++; // ingame sens