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
728505f0
Commit
728505f0
authored
Oct 03, 2019
by
kenan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
居中
parent
90f4a6cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+9
-2
irrlicht/include/SIrrCreationParameters.h
irrlicht/include/SIrrCreationParameters.h
+6
-0
irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp
irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp
+2
-2
irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.h
irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.h
+2
-0
No files found.
Classes/gframe/game.cpp
View file @
728505f0
...
...
@@ -35,6 +35,11 @@ bool Game::Initialize() {
#endif
srand
(
time
(
0
));
irr
::
SIrrlichtCreationParameters
params
=
irr
::
SIrrlichtCreationParameters
();
int
screenH
=
android
::
getScreenHeight
(
app
);
int
screenW
=
android
::
getScreenWidth
(
app
);
xScale
=
screenH
/
1024.0
;
yScale
=
screenW
/
640.0
;
#ifdef _IRR_ANDROID_PLATFORM_
android
::
InitOptions
*
options
=
android
::
getInitOptions
(
app
);
glversion
=
options
->
getOpenglVersion
();
...
...
@@ -48,6 +53,8 @@ bool Game::Initialize() {
params
.
ZBufferBits
=
16
;
params
.
AntiAlias
=
0
;
params
.
WindowSize
=
irr
::
core
::
dimension2d
<
u32
>
(
0
,
0
);
params
.
WindowLeft
=
(
screenH
-
1024.0
*
xScale
)
/
2.0
;
params
.
WindowTop
=
(
screenW
-
640.0
*
yScale
)
/
2.0
;
#else
if
(
gameConf
.
use_d3d
)
params
.
DriverType
=
irr
::
video
::
EDT_DIRECT3D9
;
...
...
@@ -55,6 +62,7 @@ bool Game::Initialize() {
params
.
DriverType
=
irr
::
video
::
EDT_OPENGL
;
params
.
WindowSize
=
irr
::
core
::
dimension2d
<
u32
>
(
1280
,
720
);
#endif
device
=
irr
::
createDeviceEx
(
params
);
if
(
!
device
)
return
false
;
...
...
@@ -70,8 +78,7 @@ bool Game::Initialize() {
// logger->setLogLevel(ELL_WARNING);
isPSEnabled
=
options
->
isPendulumScaleEnabled
();
dataManager
.
FileSystem
=
device
->
getFileSystem
();
xScale
=
android
::
getScreenHeight
(
app
)
/
1024.0
;
yScale
=
android
::
getScreenWidth
(
app
)
/
640.0
;
/* if (xScale < yScale) {
* xScale = android::getScreenWidth(app) / 1024.0;
* yScale = android::getScreenHeight(app) / 640.0;
...
...
irrlicht/include/SIrrCreationParameters.h
View file @
728505f0
...
...
@@ -51,6 +51,8 @@ namespace irr
UsePerformanceTimer
(
true
),
SDK_version_do_not_use
(
IRRLICHT_SDK_VERSION
),
PrivateData
(
0
),
WindowLeft
(
0
),
WindowTop
(
0
),
#ifdef _IRR_COMPILE_WITH_IPHONE_DEVICE_
OGLES2ShaderPath
(
""
)
#elif defined(_IRR_ANDROID_PLATFORM_)
...
...
@@ -117,6 +119,10 @@ namespace irr
//! Size of the window or the video mode in fullscreen mode. Default: 800x600
core
::
dimension2d
<
u32
>
WindowSize
;
int
WindowLeft
;
int
WindowTop
;
//! Position of the window on-screen. Default: (-1, -1) or centered.
core
::
position2di
WindowPosition
;
...
...
irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp
View file @
728505f0
...
...
@@ -38,7 +38,7 @@ CIrrDeviceAndroid::CIrrDeviceAndroid(const SIrrlichtCreationParameters& param)
#ifdef _DEBUG
setDebugName
(
"CIrrDeviceAndroid"
);
#endif
startPoint
=
core
::
position2di
(
param
.
WindowLeft
,
param
.
WindowTop
);
// Get the interface to the native Android activity.
Android
=
(
ANDROID_APP
)(
param
.
PrivateData
);
...
...
@@ -189,7 +189,7 @@ void CIrrDeviceAndroid::restoreWindow()
core
::
position2di
CIrrDeviceAndroid
::
getWindowPosition
()
{
return
core
::
position2di
(
0
,
0
)
;
return
startPoint
;
}
E_DEVICE_TYPE
CIrrDeviceAndroid
::
getType
()
const
...
...
irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.h
View file @
728505f0
...
...
@@ -75,6 +75,8 @@ namespace irr
bool
Focused
;
bool
Initialized
;
bool
Paused
;
core
::
position2di
startPoint
;
JNIEnv
*
JNIEnvAttachedToVM
;
...
...
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