From f2b1dbb09d519171e9f5c931c1b8875624a86ca5 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 29 Jan 2013 22:58:07 +0100 Subject: [PATCH] Misc fixes in boot mode - Made the sounds loaded only once, triggering less crashes on app quit so far. - Made the development version string not translatable anymore. --- src/modes/boot/boot.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/modes/boot/boot.cpp b/src/modes/boot/boot.cpp index a3d99a90a..99a49a7dd 100644 --- a/src/modes/boot/boot.cpp +++ b/src/modes/boot/boot.cpp @@ -79,10 +79,11 @@ BootMode::BootMode() : IF_PRINT_DEBUG(BOOT_DEBUG) << "BootMode constructor invoked" << std::endl; mode_type = MODE_MANAGER_BOOT_MODE; - _version_text.SetStyle(TextStyle("text20")); - std::string date_string = " - "; - date_string.append(__DATE__); - _version_text.SetText(UTranslate("Development Release") + MakeUnicodeString(date_string)); + // Note: Not translated on purpose. + _version_text.SetStyle(TextStyle("text18")); + std::string version_string = "Development Release - "; + version_string.append(__DATE__); + _version_text.SetText(MakeUnicodeString(version_string)); // Get rid of the old table to make sure no old data is used. ScriptManager->DropGlobalTable("boot"); @@ -126,6 +127,14 @@ BootMode::BootMode() : // make sure message window is not visible _message_window.Hide(); + + // Preload test sound + AudioManager->LoadSound("snd/volume_test.wav", this); + // Preload main sounds + AudioManager->LoadSound("snd/confirm.wav", this); + AudioManager->LoadSound("snd/cancel.wav", this); + AudioManager->LoadSound("snd/bump.wav", this); + AudioManager->LoadSound("snd/new_game.wav", this); } // BootMode::BootMode() @@ -410,11 +419,6 @@ void BootMode::_SetupMainMenu() } else { _main_menu.SetSelection(1); } - - // Preload main sounds - AudioManager->LoadSound("snd/confirm.wav"); - AudioManager->LoadSound("snd/cancel.wav"); - AudioManager->LoadSound("snd/bump.wav"); } @@ -481,9 +485,6 @@ void BootMode::_SetupAudioOptionsMenu() _audio_options_menu.AddOption(UTranslate("Music Volume: "), NULL, NULL, NULL, &BootMode::_OnMusicLeft, &BootMode::_OnMusicRight); _audio_options_menu.SetSelection(0); - - // Preload test sound - AudioManager->LoadSound("snd/volume_test.wav", this); }