Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
c64abeaf
Commit
c64abeaf
authored
Oct 24, 2019
by
kenan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
size
parent
8f3846e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
libcore/src/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
...rc/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
+4
-0
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
+8
-2
No files found.
libcore/src/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
View file @
c64abeaf
...
@@ -92,6 +92,10 @@ public class GameSize {
...
@@ -92,6 +92,10 @@ public class GameSize {
", height="
+
height
+
", height="
+
height
+
", touchX="
+
touchX
+
", touchX="
+
touchX
+
", touchY="
+
touchY
+
", touchY="
+
touchY
+
", fullW="
+
fullW
+
", fullH="
+
fullH
+
", actW="
+
actW
+
", actH="
+
actH
+
'}'
;
'}'
;
}
}
}
}
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
View file @
c64abeaf
...
@@ -35,6 +35,7 @@ class LocalGameHost extends GameHost {
...
@@ -35,6 +35,7 @@ class LocalGameHost extends GameHost {
private
Context
context
;
private
Context
context
;
private
SharedPreferences
settings
;
private
SharedPreferences
settings
;
private
boolean
mInitBot
=
false
;
private
boolean
mInitBot
=
false
;
private
GameSize
mGameSize
;
LocalGameHost
(
Context
context
)
{
LocalGameHost
(
Context
context
)
{
super
(
context
);
super
(
context
);
...
@@ -153,6 +154,7 @@ class LocalGameHost extends GameHost {
...
@@ -153,6 +154,7 @@ class LocalGameHost extends GameHost {
// }
// }
GameSize
gameSize
=
new
GameSize
(
gw
,
gh
,
left
,
top
);
GameSize
gameSize
=
new
GameSize
(
gw
,
gh
,
left
,
top
);
gameSize
.
setScreen
(
fullW
,
fullH
,
actW
,
actH
);
gameSize
.
setScreen
(
fullW
,
fullH
,
actW
,
actH
);
mGameSize
=
gameSize
;
return
gameSize
;
return
gameSize
;
}
}
...
@@ -198,14 +200,18 @@ class LocalGameHost extends GameHost {
...
@@ -198,14 +200,18 @@ class LocalGameHost extends GameHost {
private
void
showDialog
(
Activity
activity
,
GameConfig
config
)
{
private
void
showDialog
(
Activity
activity
,
GameConfig
config
)
{
DialogPlus
dlg
=
new
DialogPlus
(
activity
);
DialogPlus
dlg
=
new
DialogPlus
(
activity
);
dlg
.
setView
(
R
.
layout
.
dialog_report
);
dlg
.
setView
(
R
.
layout
.
dialog_report
);
GameSize
size
=
getGameSize
(
activity
,
config
);
GameSize
size
=
mGameSize
;
if
(
size
==
null
){
size
=
getGameSize
(
activity
,
config
);
Log
.
i
(
"kk"
,
"gen size "
+
size
);
}
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_model
)).
setText
(
Build
.
MODEL
+
"/"
+
Build
.
PRODUCT
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_model
)).
setText
(
Build
.
MODEL
+
"/"
+
Build
.
PRODUCT
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_android
)).
setText
(
Build
.
VERSION
.
RELEASE
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_android
)).
setText
(
Build
.
VERSION
.
RELEASE
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_rom
)).
setText
(
String
.
valueOf
(
RomIdentifier
.
getRomType
(
activity
)));
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_rom
)).
setText
(
String
.
valueOf
(
RomIdentifier
.
getRomType
(
activity
)));
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_rom_ver
)).
setText
(
RomIdentifier
.
getRomInfo
(
activity
).
getVersion
());
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_rom_ver
)).
setText
(
RomIdentifier
.
getRomInfo
(
activity
).
getVersion
());
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_cut_screen
)).
setText
(
ScreenUtil
.
hasNotchInformation
(
activity
)
?
"Yes"
:
"No"
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_cut_screen
)).
setText
(
ScreenUtil
.
hasNotchInformation
(
activity
)
?
"Yes"
:
"No"
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_nav_bar
)).
setText
(
ScreenUtil
.
isNavigationBarShown
(
activity
)
?
"Yes"
:
"No"
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_nav_bar
)).
setText
(
ScreenUtil
.
isNavigationBarShown
(
activity
)
?
"Yes"
:
"No"
);
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_screen_size
)).
setText
(
String
.
format
(
"real:%dx%d, cur=%dx%d
"
,
size
.
getFullW
(),
size
.
getFullH
(),
size
.
getActW
(),
size
.
getActH
()));
((
TextView
)
dlg
.
findViewById
(
R
.
id
.
tv_screen_size
)).
setText
(
String
.
format
(
"real:%dx%d, cur=%dx%d
, game=%dx%d"
,
size
.
getFullW
(),
size
.
getFullH
(),
size
.
getActW
(),
size
.
getActH
(),
size
.
getWidth
(),
size
.
getHeight
()));
dlg
.
findViewById
(
R
.
id
.
btn_ok
).
setOnClickListener
((
v
)
->
{
dlg
.
findViewById
(
R
.
id
.
btn_ok
).
setOnClickListener
((
v
)
->
{
dlg
.
dismiss
();
dlg
.
dismiss
();
});
});
...
...
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