summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-04-07 22:22:54 +0200
committerGitHub <noreply@github.com>2017-04-07 22:22:54 +0200
commitb81d5f4687a5f56c6cd5fc9b4545ff792378d3c7 (patch)
tree2fe73b9c38cd02fe4d851f5e8f5b50d2af449af1 /main
parentfc45c1e6eb361c6ff4d5d76c39c7a34b113c7216 (diff)
parent665bf529481c0dbe9345d2473bce8f8d99ece0c5 (diff)
Merge pull request #8308 from RandomShaper/optimize-out-debug-n-non-tools
Optimize-out some debug and/or non-tools methods
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index f905e22070..a59d450001 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -94,8 +94,10 @@ static bool init_maximized = false;
static bool init_windowed = false;
static bool init_fullscreen = false;
static bool init_use_custom_pos = false;
+#ifdef DEBUG_ENABLED
static bool debug_collisions = false;
static bool debug_navigation = false;
+#endif
static int frame_delay = 0;
static Vector2 init_custom_pos;
static int video_driver_idx = -1;
@@ -498,10 +500,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (I->get() == "-debug" || I->get() == "-d") {
debug_mode = "local";
+#ifdef DEBUG_ENABLED
} else if (I->get() == "-debugcol" || I->get() == "-dc") {
debug_collisions = true;
} else if (I->get() == "-debugnav" || I->get() == "-dn") {
debug_navigation = true;
+#endif
} else if (I->get() == "-editor_scene") {
if (I->next()) {
@@ -1194,12 +1198,15 @@ bool Main::start() {
SceneTree *sml = main_loop->cast_to<SceneTree>();
+#ifdef DEBUG_ENABLED
if (debug_collisions) {
sml->set_debug_collisions_hint(true);
}
if (debug_navigation) {
sml->set_debug_navigation_hint(true);
}
+#endif
+
#ifdef TOOLS_ENABLED
EditorNode *editor_node = NULL;