Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / BUG: getDeviceHeight() on Android

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Aug 2015 10:48
I have used some code from Markus in another thread because it is a good demonstration of this problem.

On Android, getDeviceHeight adds 24 pixels to the actual height. In the code below you will see the render target uses this height, and the drawn circle is missing the top and bottom. The circle is supposed to be the exact height of the screen.



Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Aug 2015 13:53
this getDeviceWidth and getDeviceHeight should give the
usable screen area.
means inner window size without system on screen gui.
at my android device at landscape mode the with is smaller than 1280 because os gui
but the height is 720.

Quote: " In the code below you will see the render target uses this height"

which row?

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Aug 2015 16:01
This row:



Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Aug 2015 17:51
that should be 100x5 pixels because this line before
SetVirtualResolution(100.0*r#,100.0)

AGK (Steam) V2 Beta .. : Windows 10 Pro, 8.1 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-09-29 03:21:22
Your offset time is: 2024-09-29 03:21:22