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
8ccaf9c4
Commit
8ccaf9c4
authored
Oct 25, 2019
by
kenan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix click
parent
93677f44
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
libcore/src/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
...rc/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
+2
-2
mobile/src/main/java/cn/garymb/ygomobile/App.java
mobile/src/main/java/cn/garymb/ygomobile/App.java
+1
-0
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
+3
-2
mobile/src/main/java/cn/garymb/ygomobile/utils/ScreenUtil.java
...e/src/main/java/cn/garymb/ygomobile/utils/ScreenUtil.java
+5
-1
No files found.
libcore/src/main/java/cn/garymb/ygomobile/interfaces/GameSize.java
View file @
8ccaf9c4
...
...
@@ -81,8 +81,8 @@ public class GameSize {
public
GameSize
(
int
width
,
int
height
,
int
touchX
,
int
touchY
)
{
this
.
width
=
width
;
this
.
height
=
height
;
this
.
touchX
=
touchX
;
this
.
touchY
=
touchY
;
this
.
touchX
=
touchX
<
0
?
0
:
touchX
;
this
.
touchY
=
touchY
<
0
?
0
:
touchY
;
}
@Override
...
...
mobile/src/main/java/cn/garymb/ygomobile/App.java
View file @
8ccaf9c4
...
...
@@ -16,6 +16,7 @@ import com.yuyh.library.imgsel.common.ImageLoader;
import
cn.garymb.ygomobile.interfaces.GameConfig
;
import
cn.garymb.ygomobile.interfaces.GameHost
;
import
cn.garymb.ygomobile.utils.CrashHandler
;
import
cn.garymb.ygomobile.utils.ScreenUtil
;
import
libwindbot.windbot.WindBot
;
public
class
App
extends
GameApplication
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/LocalGameHost.java
View file @
8ccaf9c4
...
...
@@ -141,7 +141,8 @@ class LocalGameHost extends GameHost {
}
maxW
=
Math
.
max
(
w1
,
h1
);
maxH
=
Math
.
min
(
w1
,
h1
);
if
(
immerSiveMode
){
boolean
hasNotouch
=
ScreenUtil
.
hasNotchInformation
(
activity
);
if
(
hasNotouch
&&
immerSiveMode
){
maxW
-=
config
.
getNotouchHeight
();
}
Log
.
i
(
"kk"
,
"real="
+
fullW
+
"x"
+
fullH
+
",cur="
+
actW
+
"x"
+
actH
+
",use="
+
maxW
+
"x"
+
maxH
);
...
...
@@ -161,7 +162,7 @@ class LocalGameHost extends GameHost {
//fix touch point
int
left
=
(
maxW
-
gw
)
/
2
;
int
top
=
(
maxH
-
gh
)
/
2
;
if
(!
immerSiveMode
){
if
(
hasNotouch
&&
!
immerSiveMode
){
//fix touch
left
=
(
maxW
-
gw
-
config
.
getNotouchHeight
())
/
2
;
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/utils/ScreenUtil.java
View file @
8ccaf9c4
...
...
@@ -46,7 +46,11 @@ public class ScreenUtil {
}
else
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
P
)
{
DisplayCutout
cutout
=
activity
.
getWindow
().
getDecorView
().
getRootWindowInsets
().
getDisplayCutout
();
return
cutout
!=
null
;
if
(
cutout
==
null
)
{
return
false
;
}
List
<
Rect
>
rects
=
cutout
.
getBoundingRects
();
return
rects
!=
null
&&
rects
.
size
()
>
0
;
}
else
{
return
false
;
}
...
...
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