all repos — mgba @ 1afed20ccc6eb506657b947003168288c8a1deca

mGBA Game Boy Advance Emulator

GUI: Save the keymap when saving the rest of the config
Jeffrey Pfau jeffrey@endrift.com
Wed, 31 Aug 2016 12:12:42 -0700
commit

1afed20ccc6eb506657b947003168288c8a1deca

parent

e078e42c8374d61f49a23abaea9258d623e3182f

1 files changed, 7 insertions(+), 0 deletions(-)

jump to
M src/feature/gui/gui-config.csrc/feature/gui/gui-config.c

@@ -114,6 +114,13 @@ continue;

} mCoreConfigSetUIntValue(&runner->config, item->data, item->state); } + if (runner->keySources) { + size_t i; + for (i = 0; runner->keySources[i].id; ++i) { + mInputMapSave(&runner->core->inputMap, runner->keySources[i].id, mCoreConfigGetInput(&runner->config)); + mInputMapSave(&runner->params.keyMap, runner->keySources[i].id, mCoreConfigGetInput(&runner->config)); + } + } mCoreConfigSave(&runner->config); mCoreLoadForeignConfig(runner->core, &runner->config); break;