@Ntero’s config.lua has a small problem:
local width, height = 0, 0
if display.pixelHeight % 1024 == 0 then --It's an iPad height
width, height = 768, 1024
else if display.pixelHeight % 568 == 0 then --It's an iOS Tall height
width, height = 320, 568
else --Must be iOS normal
width, height = 320, 480
end
For things that are not iPad, they are scaled at 320px. For the iPad they are scaled at 768px. If you’re using 320 as the base, that should be:
width, height = 360, 480
For me I do something like this:
if string.sub( system.getInfo( "model" ),1,4) == "iPad" then
width, height = 360, 480
elseif string.sub(system.getInfo("model",1,2) == "iP" and display.pixelHeight \> 960 then
width, height = 320, 568
else
width, height = 320, 480
end
or something similar using @Ntero’s way of doing things.
EDIT to add: The reason I don’t just check system.getInfo(“model”) against “iPad” and do a sub-string is because if you’re running this in Apple’s simulator the model is “iPad Simulator”. Also we don’t know what model the iPad mini is going to return yet and if it’s iPad Mini then the sub-string bit future protects us.
[import]uid: 19626 topic_id: 32730 reply_id: 130304[/import]