From 0364d6b076cfc4e75985731b67f8155bf173dd06 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 31 Jan 2016 18:47:13 -0300 Subject: [PATCH] do not fail on invalid audio driver, fixes #3466 --- main/main.cpp | 6 ++++-- tools/editor/project_settings.cpp | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/main/main.cpp b/main/main.cpp index 19fe037613b..f8786f5aecf 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -726,8 +726,9 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas /* Determine Video Driver */ - if (audio_driver=="") // specified in engine.cfg + if (audio_driver=="") { // specified in engine.cfg audio_driver=GLOBAL_DEF("audio/driver",OS::get_singleton()->get_audio_driver_name(0)); + } for (int i=0;iget_video_driver_count();i++) { @@ -758,7 +759,8 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas if (audio_driver_idx<0) { OS::get_singleton()->alert( "Invalid Audio Driver: "+audio_driver ); - goto error; + audio_driver_idx = 0; + //goto error; } { diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index cbac870a6b8..f889cc77487 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -924,10 +924,12 @@ void ProjectSettings::_autoload_delete(Object *p_item,int p_column, int p_button if (p_button==0) { //delete + int order = Globals::get_singleton()->get_order(name); undo_redo->create_action("Remove Autoload"); undo_redo->add_do_property(Globals::get_singleton(),name,Variant()); undo_redo->add_undo_property(Globals::get_singleton(),name,Globals::get_singleton()->get(name)); undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",name,true); + undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,order); undo_redo->add_do_method(this,"_update_autoload"); undo_redo->add_undo_method(this,"_update_autoload"); undo_redo->add_do_method(this,"_settings_changed");