Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
a1a71c05
Unverified
Commit
a1a71c05
authored
May 24, 2019
by
Rémi Verschelde
Committed by
GitHub
May 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #28993 from Calinou/server-hide-noop-cli-arguments
Hide non-applicable CLI arguments in the server platform
parents
25d2ee67
2964e198
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
46 deletions
+54
-46
main.cpp
main/main.cpp
+54
-46
No files found.
main/main.cpp
View file @
a1a71c05
...
...
@@ -247,6 +247,7 @@ void Main::print_help(const char *p_binary) {
OS
::
get_singleton
()
->
print
(
").
\n
"
);
OS
::
get_singleton
()
->
print
(
"
\n
"
);
#ifndef SERVER_ENABLED
OS
::
get_singleton
()
->
print
(
"Display options:
\n
"
);
OS
::
get_singleton
()
->
print
(
" -f, --fullscreen Request fullscreen mode.
\n
"
);
OS
::
get_singleton
()
->
print
(
" -m, --maximized Request a maximized window.
\n
"
);
...
...
@@ -257,14 +258,15 @@ void Main::print_help(const char *p_binary) {
OS
::
get_singleton
()
->
print
(
" --low-dpi Force low-DPI mode (macOS and Windows only).
\n
"
);
OS
::
get_singleton
()
->
print
(
" --no-window Disable window creation (Windows only). Useful together with --script.
\n
"
);
OS
::
get_singleton
()
->
print
(
"
\n
"
);
#endif
OS
::
get_singleton
()
->
print
(
"Debug options:
\n
"
);
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
"
);
OS
::
get_singleton
()
->
print
(
" --remote-debug <address> Remote debug (<host/IP>:<port> address).
\n
"
);
#if
def DEBUG_ENABLED
OS
::
get_singleton
()
->
print
(
" --debug-collisions Show collision
s
shapes when running the scene.
\n
"
);
#if
defined(DEBUG_ENABLED) && !defined(SERVER_ENABLED)
OS
::
get_singleton
()
->
print
(
" --debug-collisions Show collision shapes when running the scene.
\n
"
);
OS
::
get_singleton
()
->
print
(
" --debug-navigation Show navigation polygons when running the scene.
\n
"
);
#endif
OS
::
get_singleton
()
->
print
(
" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).
\n
"
);
...
...
@@ -429,6 +431,49 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
print_line
(
get_full_version_string
());
goto
error
;
}
else
if
(
I
->
get
()
==
"-v"
||
I
->
get
()
==
"--verbose"
)
{
// verbose output
OS
::
get_singleton
()
->
_verbose_stdout
=
true
;
}
else
if
(
I
->
get
()
==
"--quiet"
)
{
// quieter output
quiet_stdout
=
true
;
}
else
if
(
I
->
get
()
==
"--audio-driver"
)
{
// audio driver
if
(
I
->
next
())
{
audio_driver
=
I
->
next
()
->
get
();
N
=
I
->
next
()
->
next
();
}
else
{
OS
::
get_singleton
()
->
print
(
"Missing audio driver argument, aborting.
\n
"
);
goto
error
;
}
}
else
if
(
I
->
get
()
==
"--video-driver"
)
{
// force video driver
if
(
I
->
next
())
{
video_driver
=
I
->
next
()
->
get
();
N
=
I
->
next
()
->
next
();
}
else
{
OS
::
get_singleton
()
->
print
(
"Missing video driver argument, aborting.
\n
"
);
goto
error
;
}
#ifndef SERVER_ENABLED
}
else
if
(
I
->
get
()
==
"-f"
||
I
->
get
()
==
"--fullscreen"
)
{
// force fullscreen
init_fullscreen
=
true
;
}
else
if
(
I
->
get
()
==
"-m"
||
I
->
get
()
==
"--maximized"
)
{
// force maximized window
init_maximized
=
true
;
video_mode
.
maximized
=
true
;
}
else
if
(
I
->
get
()
==
"-w"
||
I
->
get
()
==
"--windowed"
)
{
// force windowed window
init_windowed
=
true
;
}
else
if
(
I
->
get
()
==
"-t"
||
I
->
get
()
==
"--always-on-top"
)
{
// force always-on-top window
init_always_on_top
=
true
;
}
else
if
(
I
->
get
()
==
"--resolution"
)
{
// force resolution
if
(
I
->
next
())
{
...
...
@@ -459,6 +504,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS
::
get_singleton
()
->
print
(
"Missing resolution argument, aborting.
\n
"
);
goto
error
;
}
}
else
if
(
I
->
get
()
==
"--position"
)
{
// set window position
if
(
I
->
next
())
{
...
...
@@ -483,29 +529,17 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
goto
error
;
}
}
else
if
(
I
->
get
()
==
"-m"
||
I
->
get
()
==
"--maximized"
)
{
// force maximized window
init_maximized
=
true
;
video_mode
.
maximized
=
true
;
}
else
if
(
I
->
get
()
==
"-w"
||
I
->
get
()
==
"--windowed"
)
{
// force windowed window
}
else
if
(
I
->
get
()
==
"--low-dpi"
)
{
// force low DPI (macOS only)
init_windowed
=
true
;
}
else
if
(
I
->
get
()
==
"-
t"
||
I
->
get
()
==
"--always-on-top"
)
{
// force always-on-top window
force_lowdpi
=
true
;
}
else
if
(
I
->
get
()
==
"-
-no-window"
)
{
// disable window creation (Windows only)
init_always_on_top
=
true
;
OS
::
get_singleton
()
->
set_no_window_mode
(
true
);
#endif
}
else
if
(
I
->
get
()
==
"--profiling"
)
{
// enable profiling
use_debug_profiler
=
true
;
}
else
if
(
I
->
get
()
==
"--video-driver"
)
{
// force video driver
if
(
I
->
next
())
{
video_driver
=
I
->
next
()
->
get
();
N
=
I
->
next
()
->
next
();
}
else
{
OS
::
get_singleton
()
->
print
(
"Missing video driver argument, aborting.
\n
"
);
goto
error
;
}
}
else
if
(
I
->
get
()
==
"-l"
||
I
->
get
()
==
"--language"
)
{
// language
if
(
I
->
next
())
{
...
...
@@ -516,9 +550,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS
::
get_singleton
()
->
print
(
"Missing language argument, aborting.
\n
"
);
goto
error
;
}
}
else
if
(
I
->
get
()
==
"--low-dpi"
)
{
// force low DPI (macOS only)
force_lowdpi
=
true
;
}
else
if
(
I
->
get
()
==
"--remote-fs"
)
{
// remote filesystem
if
(
I
->
next
())
{
...
...
@@ -555,22 +587,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS
::
get_singleton
()
->
print
(
"Missing render thread mode argument, aborting.
\n
"
);
goto
error
;
}
}
else
if
(
I
->
get
()
==
"--audio-driver"
)
{
// audio driver
if
(
I
->
next
())
{
audio_driver
=
I
->
next
()
->
get
();
N
=
I
->
next
()
->
next
();
}
else
{
OS
::
get_singleton
()
->
print
(
"Missing audio driver argument, aborting.
\n
"
);
goto
error
;
}
}
else
if
(
I
->
get
()
==
"-f"
||
I
->
get
()
==
"--fullscreen"
)
{
// force fullscreen
//video_mode.fullscreen=false;
init_fullscreen
=
true
;
#ifdef TOOLS_ENABLED
}
else
if
(
I
->
get
()
==
"-e"
||
I
->
get
()
==
"--editor"
)
{
// starts editor
...
...
@@ -583,14 +599,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
auto_build_solutions
=
true
;
editor
=
true
;
#endif
}
else
if
(
I
->
get
()
==
"--no-window"
)
{
// disable window creation, Windows only
OS
::
get_singleton
()
->
set_no_window_mode
(
true
);
}
else
if
(
I
->
get
()
==
"--quiet"
)
{
// quieter output
quiet_stdout
=
true
;
}
else
if
(
I
->
get
()
==
"-v"
||
I
->
get
()
==
"--verbose"
)
{
// verbose output
OS
::
get_singleton
()
->
_verbose_stdout
=
true
;
}
else
if
(
I
->
get
()
==
"--path"
)
{
// set path of project to start or edit
if
(
I
->
next
())
{
...
...
@@ -674,7 +682,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
else
if
(
I
->
get
()
==
"-d"
||
I
->
get
()
==
"--debug"
)
{
debug_mode
=
"local"
;
#if
def DEBUG_ENABLED
#if
defined(DEBUG_ENABLED) && !defined(SERVER_ENABLED)
}
else
if
(
I
->
get
()
==
"--debug-collisions"
)
{
debug_collisions
=
true
;
}
else
if
(
I
->
get
()
==
"--debug-navigation"
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment