Commit cc7d7b21 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

Duke3d: hide buttons missing from the current controller in the controller setup menu

parent 1c9f5368
......@@ -236,7 +236,7 @@ static MenuMenuFormat_t MMF_SmallOptions = { { MENU_MARGIN_WIDE<<16,
static MenuMenuFormat_t MMF_Macros = { { 26<<16, 40<<16, }, 160<<16 };
static MenuMenuFormat_t MMF_SmallOptionsNarrow = { { MENU_MARGIN_REGULAR<<16, 38<<16, }, -(190<<16) };
static MenuMenuFormat_t MMF_KeyboardSetupFuncs = { { 50<<16, 34<<16, }, 151<<16 };
static MenuMenuFormat_t MMF_MouseJoySetupBtns = { { 76<<16, 34<<16, }, 162<<16 };
static MenuMenuFormat_t MMF_MouseJoySetupBtns = { { 76<<16, 34<<16, }, 168<<16 };
static MenuMenuFormat_t MMF_FuncList = { { 100<<16, 51<<16, }, 152<<16 };
static MenuMenuFormat_t MMF_ColorCorrect = { { MENU_MARGIN_REGULAR<<16, 86<<16, }, 190<<16 };
static MenuMenuFormat_t MMF_BigSliders = { { MENU_MARGIN_WIDE<<16, 37<<16, }, 190<<16 };
......@@ -1987,6 +1987,13 @@ void Menu_Init(void)
{
if (i < joystick.numButtons)
{
if (!joyHasButton(i))
{
ME_JOYSTICKBTNS[i] = {};
ME_JOYSTICKBTNS[i].flags = MEF_Hidden;
continue;
}
auto const name = joyGetName(1, i);
Bassert(name != nullptr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment