Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Problem getting real device bound — Gideros Forum

Problem getting real device bound

edited July 2015 in General questions
Hi,
I used to get MINX, MAXX, MINY, MAXY by this code:
--static variable
local math_floor = math.floor;
local lw = application:getContentWidth()
local lh = application:getContentHeight()
_G.MINX = math_floor(-application:getLogicalTranslateX() / application:getLogicalScaleX())
_G.MINY = math_floor(-application:getLogicalTranslateY() / application:getLogicalScaleY())
_G.MAXX,_G.MAXY = lw - MINX,lh - MINY;
_G.W, _G.H = MAXX - MINX, MAXY - MINY;
_G.CX,_G.CY = MINX + W * 0.5, MINY + H * 0.5
 
print ( "MINX, MAXX, MINY, MAXY",MINX, MAXX, MINY, MAXY)
But in 2015.07.15 version, when i run gideros player on sony device ( 720 x 1280), it printout:
MINX, MAXX, MINY, MAXY	-112 	1312 	-0	800
It should be:
MINX, MAXX, MINY, MAXY	-58	1258	-0	800
(Tested in 2014.01)
(My project config as image attach)

Is this a bug or can you show the new codes to get real device bounds?

Thank!
Screen Shot 2015-07-17 at 10.37.32 AM.png
2880 x 1800 - 638K
Coming soon

Comments

Sign In or Register to comment.