1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix crash when no audio driver is available

This commit is contained in:
Marcelo Fernandez
2017-09-13 13:34:22 -03:00
committed by marcelofg55
parent d6b392825f
commit 7a4c0ff35e
13 changed files with 53 additions and 83 deletions

View File

@@ -268,12 +268,7 @@ void OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_aud
joypad = ref new JoypadUWP(input);
joypad->register_events();
AudioDriverManager::get_driver(p_audio_driver)->set_singleton();
if (AudioDriverManager::get_driver(p_audio_driver)->init() != OK) {
ERR_PRINT("Initializing audio failed.");
}
AudioDriverManager::initialize(p_audio_driver);
power_manager = memnew(PowerUWP);