diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 25 | ||||
-rw-r--r-- | main/main.h | 2 | ||||
-rw-r--r-- | main/main_timer_sync.h | 2 | ||||
-rw-r--r-- | main/performance.cpp | 4 | ||||
-rw-r--r-- | main/performance.h | 5 |
5 files changed, 13 insertions, 25 deletions
diff --git a/main/main.cpp b/main/main.cpp index f2d057665a..82be327cbb 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -30,6 +30,7 @@ #include "main.h" +#include "core/config/project_settings.h" #include "core/core_string_names.h" #include "core/crypto/crypto.h" #include "core/debugger/engine_debugger.h" @@ -41,12 +42,11 @@ #include "core/io/image_loader.h" #include "core/io/ip.h" #include "core/io/resource_loader.h" -#include "core/message_queue.h" +#include "core/object/message_queue.h" #include "core/os/dir_access.h" #include "core/os/os.h" -#include "core/project_settings.h" #include "core/register_core_types.h" -#include "core/translation.h" +#include "core/string/translation.h" #include "core/version.h" #include "core/version_hash.gen.h" #include "drivers/register_driver_types.h" @@ -334,8 +334,8 @@ void Main::print_help(const char *p_binary) { OS::get_singleton()->print(" -d, --debug Debug (local stdout debugger).\n"); OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n"); OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n"); -#if DEBUG_ENABLED OS::get_singleton()->print(" --vk-layers Enable Vulkan Validation layers for debugging.\n"); +#if DEBUG_ENABLED OS::get_singleton()->print(" --gpu-abort Abort on GPU errors (usually validation layer errors), may help see the problem if your system freezes.\n"); #endif OS::get_singleton()->print(" --remote-debug <uri> Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n"); @@ -698,9 +698,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (I->get() == "-w" || I->get() == "--windowed") { // force windowed window init_windowed = true; -#ifdef DEBUG_ENABLED } else if (I->get() == "--vk-layers") { Engine::singleton->use_validation_layers = true; +#ifdef DEBUG_ENABLED } else if (I->get() == "--gpu-abort") { Engine::singleton->abort_on_gpu_errors = true; #endif @@ -1143,7 +1143,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph use_custom_res = false; input_map->load_default(); //keys for editor } else { - input_map->load_from_globals(); //keys for game + input_map->load_from_project_settings(); //keys for game } if (bool(ProjectSettings::get_singleton()->get("application/run/disable_stdout"))) { @@ -1608,7 +1608,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { GLOBAL_DEF("application/config/icon", String()); ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon", PropertyInfo(Variant::STRING, "application/config/icon", - PROPERTY_HINT_FILE, "*.png,*.webp")); + PROPERTY_HINT_FILE, "*.png,*.webp,*.svg,*.svgz")); GLOBAL_DEF("application/config/macos_native_icon", String()); ProjectSettings::get_singleton()->set_custom_property_info("application/config/macos_native_icon", @@ -1890,14 +1890,6 @@ bool Main::start() { return false; } - if (_export_preset != "") { - if (positional_arg == "") { - String err = "Command line includes export parameter option, but no destination path was given.\n"; - err += "Please specify the binary's file path to export to. Aborting export."; - ERR_PRINT(err); - return false; - } - } #endif if (script == "" && game_path == "" && String(GLOBAL_DEF("application/run/main_scene", "")) != "") { @@ -2232,7 +2224,7 @@ bool Main::start() { #ifdef TOOLS_ENABLED if (editor) { - if (game_path != GLOBAL_GET("application/run/main_scene") || !editor_node->has_scenes_in_session()) { + if (game_path != String(GLOBAL_GET("application/run/main_scene")) || !editor_node->has_scenes_in_session()) { Error serr = editor_node->load_scene(local_game_path); if (serr != OK) { ERR_PRINT("Failed to load scene"); @@ -2396,7 +2388,6 @@ bool Main::iteration() { for (int iters = 0; iters < advance.physics_steps; ++iters) { uint64_t physics_begin = OS::get_singleton()->get_ticks_usec(); - PhysicsServer3D::get_singleton()->sync(); PhysicsServer3D::get_singleton()->flush_queries(); PhysicsServer2D::get_singleton()->sync(); diff --git a/main/main.h b/main/main.h index 75a1c0d8cd..168b2e5e86 100644 --- a/main/main.h +++ b/main/main.h @@ -31,7 +31,7 @@ #ifndef MAIN_H #define MAIN_H -#include "core/error_list.h" +#include "core/error/error_list.h" #include "core/os/thread.h" #include "core/typedefs.h" diff --git a/main/main_timer_sync.h b/main/main_timer_sync.h index 2126381c7c..f8497140cd 100644 --- a/main/main_timer_sync.h +++ b/main/main_timer_sync.h @@ -31,7 +31,7 @@ #ifndef MAIN_TIMER_SYNC_H #define MAIN_TIMER_SYNC_H -#include "core/engine.h" +#include "core/config/engine.h" struct MainFrameTime { float idle_step; // time to advance idles for (argument to process()) diff --git a/main/performance.cpp b/main/performance.cpp index 7234511aeb..9de269ba5f 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -30,7 +30,7 @@ #include "performance.h" -#include "core/message_queue.h" +#include "core/object/message_queue.h" #include "core/os/os.h" #include "scene/main/node.h" #include "scene/main/scene_tree.h" @@ -93,7 +93,6 @@ float Performance::_get_node_count() const { String Performance::get_monitor_name(Monitor p_monitor) const { ERR_FAIL_INDEX_V(p_monitor, MONITOR_MAX, String()); static const char *names[MONITOR_MAX] = { - "time/fps", "time/process", "time/physics_process", @@ -195,7 +194,6 @@ Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const ERR_FAIL_INDEX_V(p_monitor, MONITOR_MAX, MONITOR_TYPE_QUANTITY); // ugly static const MonitorType types[MONITOR_MAX] = { - MONITOR_TYPE_QUANTITY, MONITOR_TYPE_TIME, MONITOR_TYPE_TIME, diff --git a/main/performance.h b/main/performance.h index f406433cf2..40f1d5cb05 100644 --- a/main/performance.h +++ b/main/performance.h @@ -31,8 +31,8 @@ #ifndef PERFORMANCE_H #define PERFORMANCE_H -#include "core/class_db.h" -#include "core/ordered_hash_map.h" +#include "core/object/class_db.h" +#include "core/templates/ordered_hash_map.h" #define PERF_WARN_OFFLINE_FUNCTION #define PERF_WARN_PROCESS_SYNC @@ -63,7 +63,6 @@ class Performance : public Object { public: enum Monitor { - TIME_FPS, TIME_PROCESS, TIME_PHYSICS_PROCESS, |