Screen dimensions bug with touch and possibly effects

I found a bug that appears on Android devices when using scaling = letterbox and landscape mode.

When I set a button in on the right side egde the button will not respond on touch until maybe 45 pixels to the left of the screen egde.

After some investigating I noticed that director.lua set a variable
[lua] local _W = display.contentWidth;[/lua]
and also uses this for transitions from right and left.

This will not work on devices other than current iOS devices, not Android with higher resolution than 480x320 pixels.

_W will always give 480px in landscape mode but on simulator skin the real resolution is:
Galaxy Tab: 513 x 320 pixels.
Nexus One: 506,5 x 320 pixels
Droid: 524,5 x 320 pixels
iPad: 480 x 340 pixels (get higher instead of wider due to screen ratio)

So the real screen width and height is calculated with display.screenOriginX.
[lua] local screenTop = display.screenOriginY
local screenBottom = display.contentHeight - display.screenOriginY
local screenLeft = display.screenOriginX
local screenRight = display.contentWidth - display.screenOriginX

local _W = screenRight - screenLeft;
local _H = screenBottom - screenTop;[/lua]

I think that in transitions where -_W and _W is used, you should use screenLeft and screenRight instead.

Right now I’m only using crossfade so I’m not suffering from this in transitions but in limited touch area.

Can you update director 1.4 with this?
This should be a feature to 1.5 as well. [import]uid: 73836 topic_id: 17143 reply_id: 317143[/import]

+1 on this, it’s the same problem that I reported on this thread: http://developer.anscamobile.com/forum/2011/10/14/bug-not-receiving-touch-events-after-changin-scene [import]uid: 57552 topic_id: 17143 reply_id: 64600[/import]