From 7413c3d9940aa9d7c51de93d2a07c2e5167962c9 Mon Sep 17 00:00:00 2001 From: David Salvisberg Date: Sat, 27 Dec 2014 14:40:08 +0100 Subject: [PATCH 1/2] Make button config menu save changes to disk whenever the changes are accepted. --- src/settingsmenu.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/settingsmenu.cpp b/src/settingsmenu.cpp index ad3b9fd..a734ffa 100644 --- a/src/settingsmenu.cpp +++ b/src/settingsmenu.cpp @@ -678,6 +678,9 @@ struct SettingsMenuPrivate rtData.bindingUpdateMsg.post(binds); + /* Store the key bindings to disk as well to prevent config loss */ + storeBindings(binds, rtData.config); + destroyReq = true; } -- 2.43.0 From 6829ddc09f88bf34bc893f3af769ed08d748e154 Mon Sep 17 00:00:00 2001 From: David Salvisberg Date: Sun, 28 Dec 2014 06:06:28 +0100 Subject: [PATCH 2/2] Removed store keybindings from main, since it now already gets stored onAccept. --- src/main.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6185e58..bdcd7ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -321,11 +321,6 @@ int main(int argc, char *argv[]) /* Clean up any remainin events */ eventThread.cleanup(); - /* Store key bindings */ - BDescVec keyBinds; - rtData.bindingUpdateMsg.get(keyBinds); - storeBindings(keyBinds, rtData.config); - Debug() << "Shutting down."; SDL_DestroyWindow(win); -- 2.43.0