Save input mappings when leaving dialog

This commit is contained in:
thrust26 2019-05-07 20:23:28 +02:00
parent e65d9250f3
commit c83d22604b
2 changed files with 7 additions and 2 deletions

View File

@ -303,6 +303,9 @@ class EventHandler
*/ */
void handleMouseControl(); void handleMouseControl();
void saveKeyMapping();
void saveJoyMapping();
protected: protected:
// Global OSystem object // Global OSystem object
OSystem& myOSystem; OSystem& myOSystem;
@ -373,8 +376,6 @@ class EventHandler
void setActionMappings(EventMode mode); void setActionMappings(EventMode mode);
void setDefaultKeymap(Event::Type, EventMode mode); void setDefaultKeymap(Event::Type, EventMode mode);
void setDefaultJoymap(Event::Type, EventMode mode); void setDefaultJoymap(Event::Type, EventMode mode);
void saveKeyMapping();
void saveJoyMapping();
void saveComboMapping(); void saveComboMapping();
private: private:

View File

@ -345,6 +345,10 @@ void InputDialog::saveConfig()
// Enable/disable control key-combos // Enable/disable control key-combos
instance().settings().setValue("ctrlcombo", myCtrlCombo->getState()); instance().settings().setValue("ctrlcombo", myCtrlCombo->getState());
instance().eventHandler().saveKeyMapping();
instance().eventHandler().saveJoyMapping();
// instance().saveConfig();
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -