Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
871e518e
Commit
871e518e
authored
Jul 21, 2021
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ygomobileActivity.oncreate读取arg
parent
27124927
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
Classes/gframe/gframe.cpp
Classes/gframe/gframe.cpp
+2
-1
libcore/src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
.../src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
+3
-2
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
+2
-2
No files found.
Classes/gframe/gframe.cpp
View file @
871e518e
...
...
@@ -68,6 +68,7 @@ int main(int argc, char* argv[]) {
//android
for
(
int
i
=
0
;
i
<
argc
;
++
i
)
{
const
char
*
arg
=
argv
[
i
].
c_str
();
os
::
Printer
::
log
(
"kkargv "
,
arg
);
#else
//pc的第一个是exe的路径
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
...
...
@@ -93,7 +94,7 @@ int main(int argc, char* argv[]) {
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
ClickButton
(
ygo
::
mainGame
->
btnJoinHost
);
break
;
}
else
if
(
!
strcmp
(
arg
,
"-r"
)
)
{
// Replay
}
else
if
(
arg
[
0
]
==
'-'
&&
arg
[
1
]
==
'r'
)
{
// Replay
exit_on_return
=
!
keep_on_return
;
int
index
=
0
;
if
((
i
+
1
)
<
argc
){
//下一个参数是录像名
...
...
libcore/src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
View file @
871e518e
...
...
@@ -118,6 +118,9 @@ public class YGOMobileActivity extends NativeActivity implements
mFullScreenUtils
=
new
FullScreenUtils
(
this
,
app
().
isImmerSiveMode
());
mFullScreenUtils
.
fullscreen
();
mFullScreenUtils
.
onCreate
();
//argv
mArgV
=
getIntent
().
getStringArrayExtra
(
IrrlichtBridge
.
EXTRA_ARGV
);
//
super
.
onCreate
(
savedInstanceState
);
Log
.
e
(
"YGOStarter"
,
"跳转完成"
+
System
.
currentTimeMillis
());
if
(
sChainControlXPostion
<
0
)
{
...
...
@@ -198,8 +201,6 @@ public class YGOMobileActivity extends NativeActivity implements
}
private
void
handleExternalCommand
(
Intent
intent
)
{
//argv
mArgV
=
intent
.
getStringArrayExtra
(
IrrlichtBridge
.
EXTRA_ARGV
);
//
YGOGameOptions
options
=
intent
.
getParcelableExtra
(
YGOGameOptions
.
YGO_GAME_OPTIONS_BUNDLE_KEY
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/YGOStarter.java
View file @
871e518e
...
...
@@ -158,7 +158,6 @@ public class YGOStarter {
* 或者(播放完不退出游戏):-k -r 1111.yrp
*/
public
static
void
startGame
(
Activity
activity
,
YGOGameOptions
options
,
String
[]
args
)
{
Log
.
i
(
"kk arg"
,
args
[
0
]
+
" "
+
args
[
1
]);
//如果距离上次加入游戏的时间大于1秒才处理
if
(
System
.
currentTimeMillis
()
-
lasttime
>=
1000
)
{
lasttime
=
System
.
currentTimeMillis
();
...
...
@@ -173,7 +172,8 @@ public class YGOStarter {
intent
.
putExtra
(
YGOGameOptions
.
YGO_GAME_OPTIONS_BUNDLE_TIME
,
System
.
currentTimeMillis
());
}
if
(
args
!=
null
)
{
intent
.
putExtra
(
IrrlichtBridge
.
EXTRA_ARGV
,
args
[
0
]
+
" "
+
args
[
1
]);
Log
.
i
(
"kk arg"
,
args
[
0
]+
""
+
args
[
1
]);
intent
.
putExtra
(
IrrlichtBridge
.
EXTRA_ARGV
,
args
);
}
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
Log
.
e
(
"YGOStarter"
,
"跳转前"
+
System
.
currentTimeMillis
());
...
...
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