diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui.cpp | 2 | ||||
-rw-r--r-- | src/gui/setup.cpp | 5 | ||||
-rw-r--r-- | src/gui/setup.h | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 24069cda..e8217cf8 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -50,7 +50,7 @@ BITMAP *gui_bitmap; bool drag; DATAFILE *gui_gfx; -extern TmwSound sound; +extern Sound sound; /* very internal update stuff */ int (*gui__external_slider_callback)(void *, int); diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 233a36a5..d4396408 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -27,7 +27,8 @@ */ #include "setup.h" -#include <allegro.h> + +extern Sound sound; /* * Metod returns the number of elements in container @@ -153,8 +154,10 @@ void Setup::action(const std::string& eventId) /* Sound settings */ if(soundCheckBox->isMarked() == true) { config.setValue("sound",1); + sound.init(32, 20); } else { config.setValue("sound",0); + sound.close(); } } else if(eventId == "cancel") { diff --git a/src/gui/setup.h b/src/gui/setup.h index 55343229..f1e10036 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -35,6 +35,7 @@ #include <winalleg.h> #endif +#include "../sound/sound.h" /* * The list model for modes list @@ -71,7 +72,7 @@ class Setup : public Window, public gcn::ActionListener { public: void action(const std::string& eventId); - static Setup * create_setup(); + static Setup * create_setup(); }; #endif |