a possible improvement to the key settings menu

This commit is contained in:
darkrose 2015-08-16 16:20:05 +10:00
parent 63703ddacf
commit ad3636a47e
1 changed files with 4 additions and 2 deletions

View File

@ -117,7 +117,8 @@ void GUISettingsMenu::removeChildren()
void GUISettingsMenu::save() void GUISettingsMenu::save()
{ {
// controls // controls
for (int i=0; i<VLKC_MAX; i++) { int m = VLKC_MAX;
for (int i=0; i<m; i++) {
saveKeySetting(keys[i],(KeyCode)i); saveKeySetting(keys[i],(KeyCode)i);
} }
// graphics // graphics
@ -552,7 +553,8 @@ bool GUISettingsMenu::acceptInput()
} }
void GUISettingsMenu::init_keys() void GUISettingsMenu::init_keys()
{ {
for (int i=0; i<VLKC_MAX; i++) { int m = VLKC_MAX;
for (int i=0; i<m; i++) {
keys[i] = getKeySetting((KeyCode)i); keys[i] = getKeySetting((KeyCode)i);
} }
} }