|
From: Lasse Kärkkäi. <tr...@us...> - 2010-10-23 15:50:20
|
Module: performous
Branch: master
Commit: 9bb429e19e8e7f4b5680e90b91aa7ac7083a0b16
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Oct 23 17:29:54 2010 +0200
Remove audiokiller from main.cc. Fix Audio/ScreenManager init order (SM needs to be destroyed before audio).
---
game/main.cc | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/game/main.cc b/game/main.cc
index a694de5..8596583 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -116,13 +116,12 @@ static void checkEvents_SDL(ScreenManager& sm) {
void mainLoop(std::string const& songlist) {
Window window(config["graphic/window_width"].i(), config["graphic/window_height"].i(), config["graphic/fullscreen"].b());
- ScreenManager sm(window);
- sm.loading(_("Audio..."), 0.1);
Audio audio;
{ // Print the devices
portaudio::AudioDevices ads;
std::clog << "audio/info:\n" << ads.dump();
}
+ ScreenManager sm(window);
try {
sm.loading(_("Launching background loaders..."), 0.4);
Backgrounds backgrounds;
@@ -214,12 +213,6 @@ void mainLoop(std::string const& songlist) {
} catch (QuitNow&) {
std::cout << "Terminated." << std::endl;
}
- // Give audio a little time to shutdown but then just quit
- boost::thread audiokiller(boost::bind(&Audio::close, boost::ref(audio)));
- if (!audiokiller.timed_join(boost::posix_time::milliseconds(2000))) {
- std::cout << "Audio hung." << std::endl;
- exit(EXIT_SUCCESS);
- }
}
/// Simple test utility to make mapping of joystick buttons/axes easier
|