diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-07-19 18:58:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-07-19 19:02:04 -0300 |
commit | c69de2ba46463adeadf90f38660d6b6e034d7e0b (patch) | |
tree | ddeb1c8e40c080a6544eba86fc12f138b54be0ed /main/main.cpp | |
parent | 76bfe14e00ee5c8b65275d8b8e0c4cdc25b4b899 (diff) |
-Project/Editor settings now use new inspector
-Project/Editor settings now show tooltips properly
-Settings thar require restart now will show a restart warning
-Video driver is now visible all the time, can be changed easily
-Added function to request current video driver
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp index 23f2776737..530b264615 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -825,7 +825,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->set_cmdline(execpath, main_args); GLOBAL_DEF("rendering/quality/driver/driver_name", "GLES3"); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_name", PROPERTY_HINT_ENUM, "GLES3,GLES2")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_name", PROPERTY_HINT_ENUM, "GLES2,GLES3")); if (video_driver == "") { video_driver = GLOBAL_GET("rendering/quality/driver/driver_name"); } @@ -914,7 +914,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } if (audio_driver == "") { // specified in project.godot - audio_driver = GLOBAL_DEF("audio/driver", OS::get_singleton()->get_audio_driver_name(0)); + audio_driver = GLOBAL_DEF_RST("audio/driver", OS::get_singleton()->get_audio_driver_name(0)); } for (int i = 0; i < OS::get_singleton()->get_audio_driver_count(); i++) { @@ -1957,6 +1957,15 @@ void Main::cleanup() { if (engine) memdelete(engine); + if (OS::get_singleton()->is_restart_on_exit_set()) { + //attempt to restart with arguments + String exec = OS::get_singleton()->get_executable_path(); + List<String> args = OS::get_singleton()->get_restart_on_exit_argumens(); + OS::ProcessID pid = 0; + OS::get_singleton()->execute(exec, args, false, &pid); + OS::get_singleton()->set_restart_on_exit(false, List<String>()); //clear list (uses memory) + } + unregister_core_driver_types(); unregister_core_types(); |