diff --git a/src/states_screens/options_screen_audio.cpp b/src/states_screens/options_screen_audio.cpp index 144fecd41..2e709cb6a 100644 --- a/src/states_screens/options_screen_audio.cpp +++ b/src/states_screens/options_screen_audio.cpp @@ -83,6 +83,15 @@ void OptionsScreenAudio::init() // ----------------------------------------------------------------------------- +void OptionsScreenAudio::tearDown() +{ + Screen::tearDown(); + // save changes when leaving screen + user_config->saveConfig(); +} // tearDown + +// ----------------------------------------------------------------------------- + void OptionsScreenAudio::eventCallback(Widget* widget, const std::string& name, const int playerID) { if (name == "options_choice") diff --git a/src/states_screens/options_screen_audio.hpp b/src/states_screens/options_screen_audio.hpp index a16067709..8cf8507cc 100644 --- a/src/states_screens/options_screen_audio.hpp +++ b/src/states_screens/options_screen_audio.hpp @@ -48,6 +48,9 @@ public: /** \brief implement callback from parent class GUIEngine::Screen */ virtual void init(); + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void tearDown(); + /** \brief implement optional callback from parent class GUIEngine::Screen */ virtual void unloaded(); };