if (!b.last_state || b.is_repeatable) {
const binding_list_t &bindings = _find_key_bindings(k, modifiers);
- for (int i = 0; i < bindings.size(); i++)
+ for (unsigned int i = 0; i < bindings.size(); i++)
bindings[i]->fire();
b.last_state = 1;
}
<< " with modifiers " << modifiers);
if (b.last_state) {
const binding_list_t &bindings = _find_key_bindings(k, modifiers);
- for (int i = 0; i < bindings.size(); i++)
+ for (unsigned int i = 0; i < bindings.size(); i++)
bindings[i]->fire();
b.last_state = 0;
}
js_node->setStringValue("id", name);
}
}
-
- // get rid of unused config nodes
- for (unsigned int m = 0; m < js_named.size(); m++)
- js_nodes->removeChild("js-named", js_named[m]->getIndex(), false);
}
{
FGNasalSys *nasalsys = (FGNasalSys *)globals->get_subsystem("nasal");
SGPropertyNode *js_nodes = fgGetNode("/input/joysticks");
+ js_nodes->removeChildren("js-named");
for (int i = 0; i < MAX_JOYSTICKS; i++) {
SGPropertyNode_ptr js_node = js_nodes->getChild("js", i);