Disable gamepad controls (#1536)

Gamepad support is currently not working properly as many menus cannot be
navigated with a gamepad. Simply don't load any control assignment sets that
have gamepad enabled.
shapetextures
Armin Burgmeier 2016-01-11 18:07:00 -08:00
parent e762e66a65
commit bd4551c6d4
1 changed files with 15 additions and 0 deletions

View File

@ -734,6 +734,21 @@ void C4PlayerControlAssignmentSets::CompileFunc(StdCompiler *pComp)
}
pComp->Value(mkNamingAdapt(clear_previous, "ClearPrevious", false));
pComp->Value(mkSTLContainerAdapt(Sets, StdCompiler::SEP_NONE));
// Remove all sets that have gamepad controls, since gamepad
// support is broken at the moment. Disable this once we have gamepad
// support again!
if (pComp->isCompiler())
{
AssignmentSetList::iterator iter = Sets.begin();
for (AssignmentSetList::iterator iter = Sets.begin(); iter != Sets.end(); )
{
if (iter->HasGamepad())
iter = Sets.erase(iter);
else
++iter;
}
}
}
bool C4PlayerControlAssignmentSets::operator ==(const C4PlayerControlAssignmentSets &cmp) const