1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-16 17:45:52 +00:00

remove minActionSets config setting

This commit is contained in:
fgenesis 2020-07-07 16:22:18 +02:00
parent 9376b1aeb3
commit 04bf58ab91
2 changed files with 3 additions and 17 deletions

View file

@ -471,13 +471,9 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
readInt(xml_control, "AutoAim", "on", &control.autoAim);
readInt(xml_control, "Targeting", "on", &control.targeting);
readInt(xml_control, "FlipInputButtons", "on", &control.flipInputButtons);
readInt(xml_control, "MinActionSets", "num", &control.minActionSets);
readInt(xml_control, "ToolTipsOn", "on", &control.toolTipsOn);
if(control.minActionSets < 1)
control.minActionSets = 1;
control.actionSets.clear();
control.actionSets.reserve(control.minActionSets);
for(XMLElement *xml_actionSet = xml_control->FirstChildElement("ActionSet"); xml_actionSet; xml_actionSet = xml_actionSet->NextSiblingElement("ActionSet"))
{
@ -514,19 +510,11 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
}
}
}
int nas = (int)control.actionSets.size();
if(nas < control.minActionSets)
control.actionSets.resize(control.minActionSets);
while(nas < control.minActionSets)
{
ActionSet& as = control.actionSets[nas];
ensureDefaultActions(as);
as.enabled = false;
++nas;
}
}
if(control.actionSets.size() == 1)
control.actionSets[0].enabled = true;
XMLElement *xml_demo = doc.FirstChildElement("Demo");
if (xml_demo)
{

View file

@ -95,7 +95,6 @@ public:
targeting = 1;
flipInputButtons = 0;
joystickEnabled = 0;
minActionSets = 4;
}
int joystickEnabled;
int autoAim;
@ -103,7 +102,6 @@ public:
int flipInputButtons;
std::vector<ActionSet> actionSets;
int toolTipsOn;
int minActionSets;
} control;
struct Demo