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
2014bb48
Unverified
Commit
2014bb48
authored
May 13, 2018
by
Rémi Verschelde
Committed by
GitHub
May 13, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18810 from eska014/cmdline
Fix command line II
parents
5e297416
430d8476
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
25 deletions
+7
-25
main.cpp
main/main.cpp
+7
-25
No files found.
main/main.cpp
View file @
2014bb48
...
...
@@ -337,7 +337,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
String
video_driver
=
""
;
String
audio_driver
=
""
;
String
game_path
;
String
project_path
=
"."
;
bool
upwards
=
false
;
String
debug_mode
;
String
debug_host
;
...
...
@@ -553,7 +553,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if
(
OS
::
get_singleton
()
->
set_cwd
(
p
)
==
OK
)
{
//nothing
}
else
{
game_path
=
I
->
next
()
->
get
();
//use game
_path instead
project_path
=
I
->
next
()
->
get
();
//use project
_path instead
}
N
=
I
->
next
()
->
next
();
}
else
{
...
...
@@ -576,7 +576,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
if
(
OS
::
get_singleton
()
->
set_cwd
(
path
)
==
OK
)
{
// path already specified, don't override
}
else
{
game
_path
=
path
;
project
_path
=
path
;
}
#ifdef TOOLS_ENABLED
editor
=
true
;
...
...
@@ -672,38 +672,20 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
else
if
(
I
->
get
()
==
"--disable-crash-handler"
)
{
OS
::
get_singleton
()
->
disable_crash_handler
();
}
else
{
//test for game path
bool
gpfound
=
false
;
if
(
!
I
->
get
().
begins_with
(
"-"
)
&&
game_path
==
""
)
{
DirAccess
*
da
=
DirAccess
::
open
(
I
->
get
());
if
(
da
!=
NULL
)
{
game_path
=
I
->
get
();
gpfound
=
true
;
memdelete
(
da
);
}
}
if
(
!
gpfound
)
{
main_args
.
push_back
(
I
->
get
());
}
main_args
.
push_back
(
I
->
get
());
}
I
=
N
;
}
if
(
game_path
.
empty
())
{
game_path
=
"."
;
}
if
(
globals
->
setup
(
game_path
,
main_pack
,
upwards
)
==
OK
)
{
if
(
globals
->
setup
(
project_path
,
main_pack
,
upwards
)
==
OK
)
{
found_project
=
true
;
}
else
{
#ifdef TOOLS_ENABLED
editor
=
false
;
#else
OS
::
get_singleton
()
->
print
(
"Error: Could not load game path '%s'.
\n
"
,
game
_path
.
ascii
().
get_data
());
OS
::
get_singleton
()
->
print
(
"Error: Could not load game path '%s'.
\n
"
,
project
_path
.
ascii
().
get_data
());
goto
error
;
#endif
...
...
@@ -994,7 +976,7 @@ error:
video_driver
=
""
;
audio_driver
=
""
;
game
_path
=
""
;
project
_path
=
""
;
args
.
clear
();
main_args
.
clear
();
...
...
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