diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-04-20 19:38:02 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-04-20 19:38:02 -0300 |
commit | 59154cccf9fcf814a21a2596993fb1b6777d3bb7 (patch) | |
tree | 4132620a9d924463dae4b64fea2dde68a14023e7 /platform/x11/os_x11.cpp | |
parent | 28c4afeb5733f9ca9725ab2a5f4066af8e02b2a6 (diff) |
-Changed Godot exit to be clean.
-Added more debug information on memory cleanliness on exit (if run with -v)
-Fixed several memory leaks, fixes #1731, fixes #755
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r-- | platform/x11/os_x11.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 413d845bf3..67ec33f3a3 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -258,9 +258,11 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton(); + audio_driver_index=p_audio_driver; if (AudioDriverManagerSW::get_driver(p_audio_driver)->init()!=OK) { bool success=false; + audio_driver_index=-1; for(int i=0;i<AudioDriverManagerSW::get_driver_count();i++) { if (i==p_audio_driver) continue; @@ -268,6 +270,7 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi success=true; print_line("Audio Driver Failed: "+String(AudioDriverManagerSW::get_driver(p_audio_driver)->get_name())); print_line("Using alternate audio driver: "+String(AudioDriverManagerSW::get_driver(i)->get_name())); + audio_driver_index=i; break; } } |