summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 58b5a6a68f..bb601198db 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -58,9 +58,9 @@
#ifdef TOOLS_ENABLED
#include "editor/doc/doc_data.h"
+#include "editor/doc/doc_data_class_path.gen.h"
#include "editor/editor_node.h"
#include "editor/project_manager.h"
-#include "editor/doc/doc_data_class_path.gen.h"
#endif
#include "io/file_access_network.h"
@@ -75,7 +75,6 @@
#include "translation.h"
#include "version.h"
-
static ProjectSettings *globals = NULL;
static Engine *engine = NULL;
static InputMap *input_map = NULL;
@@ -195,6 +194,7 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).\n");
OS::get_singleton()->print(" --time-scale <scale> Force time scale (higher values are faster, 1.0 is normal speed).\n");
OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n");
+ OS::get_singleton()->print(" --disable-crash-handler Disable crash handler when supported by the platform code.\n");
OS::get_singleton()->print(" --fixed-fps <fps> Forces a fixed ratio between process and fixed_process timing, for use when precision is required, or when rendering to video files. Setting this will disable real-time syncronization, so that run speed is only capped by performance\n");
OS::get_singleton()->print("\n");
@@ -248,6 +248,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
performance = memnew(Performance);
globals->add_singleton(ProjectSettings::Singleton("Performance", performance));
+ GLOBAL_DEF("debug/settings/backtrace/message", String("Please include this when reporting the bug on https://github.com/godotengine/godot/issues"));
+
MAIN_PRINT("Main: Parse CMDLine");
/* argument parsing and main creation */
@@ -583,6 +585,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->print("Missing fixed-fps argument, aborting.\n");
goto error;
}
+ } else if (I->get() == "--disable-crash-handler") {
+ OS::get_singleton()->disable_crash_handler();
} else {
//test for game path
@@ -1155,37 +1159,36 @@ bool Main::start() {
DocData doc;
doc.generate(doc_base);
-
DocData docsrc;
- Map<String,String> doc_data_classes;
+ Map<String, String> doc_data_classes;
Set<String> checked_paths;
print_line("Loading docs..");
- for(int i=0;i<_doc_data_class_path_count;i++) {
+ for (int i = 0; i < _doc_data_class_path_count; i++) {
String path = doc_tool.plus_file(_doc_data_class_paths[i].path);
String name = _doc_data_class_paths[i].name;
- doc_data_classes[name]=path;
+ doc_data_classes[name] = path;
if (!checked_paths.has(path)) {
checked_paths.insert(path);
docsrc.load_classes(path);
- print_line("Loading docs from: "+path);
+ print_line("Loading docs from: " + path);
}
}
String index_path = doc_tool.plus_file("doc/classes");
docsrc.load_classes(index_path);
checked_paths.insert(index_path);
- print_line("Loading docs from: "+index_path);
+ print_line("Loading docs from: " + index_path);
print_line("Merging docs..");
doc.merge_from(docsrc);
- for (Set<String>::Element *E=checked_paths.front();E;E=E->next()) {
- print_line("Erasing old docs at: "+E->get());
+ for (Set<String>::Element *E = checked_paths.front(); E; E = E->next()) {
+ print_line("Erasing old docs at: " + E->get());
DocData::erase_classes(E->get());
}
print_line("Generating new docs..");
- doc.save_classes(index_path,doc_data_classes);
+ doc.save_classes(index_path, doc_data_classes);
return false;
}