Hi Guys,
Yet another strange issue I have discovered with iOS9 and iPhone 6.
it apears that display.screenOriginY and display.screenOriginX are not working as expected.
my config.lua is:
application = { content = { width = 640, height = 1136, scale = "letterBox", fps = 60, ...
My code is as follows:
print( "GAME\_CONFIG: Actual content width: " .. GameConfig.actualContentWidth) print( "GAME\_CONFIG: Actual content height: " .. GameConfig.actualContentHeight) print( "GAME\_CONFIG: viewable content width: " .. display.viewableContentWidth) print( "GAME\_CONFIG: viewable content height: " .. display.viewableContentHeight) print( "GAME\_CONFIG: pixelWidth: " .. display.pixelWidth) print( "GAME\_CONFIG: pixelHeight: " .. display.pixelHeight) print( "GAME\_CONFIG: start X shift: " .. display.screenOriginY) print( "GAME\_CONFIG: start Y shift: " .. display.screenOriginX)
Simulator output (correct):
GAME_CONFIG: Actual content width: 1138.3466796875
GAME_CONFIG: Actual content height: 640
GAME_CONFIG: viewable content width: 1136
GAME_CONFIG: viewable content height: 640
GAME_CONFIG: pixelWidth: 750
GAME_CONFIG: pixelHeight: 1334
GAME_CONFIG: start X shift: -1
GAME_CONFIG: start Y shift: -0
Real device output (incorrect):
Nov 23 22:12:44 Twistedtransistor Sheeepy[289] <Warning>: GAME_CONFIG: Actual content width: 1136
Nov 23 22:12:44 Twistedtransistor Sheeepy[289] <Warning>: GAME_CONFIG: Actual content height: 757.333
Nov 23 22:12:44 Twistedtransistor Sheeepy[289] <Warning>: GAME_CONFIG: viewable content width: 1136
Nov 23 22:12:44 Twistedtransistor Sheeepy[289] <Warning>: GAME_CONFIG: viewable content height: 640
Nov 23 22:12:44 Twistedtransistor Sheeepy[289] <Warning>:GAME_CONFIG: pixelWidth: 750
Nov 23 22:12:44 Twistedtransistor Sheeepy[289] <Warning>:GAME_CONFIG: pixelHeight: 1334
Nov 23 22:12:44 Twistedtransistor Sheeepy[289] <Warning>: GAME_CONFIG: start X shift: -0
Nov 23 22:12:44 Twistedtransistor Sheeepy[289] <Warning>: GAME_CONFIG: start Y shift: -58.5
Please see the difference with Actual content height in simulator and device.
As outcome of this issue I’m getting black strips at the edges of the screen. These black strips are not present in simulator, nor android, nor in iOS8. This appeard on iOS9 only.
Any smart ideas how to fix it?
If you would have any questions please let me know.
Cheers,
Radek