Created
September 19, 2012 18:20
-
-
Save deanPGM/3751257 to your computer and use it in GitHub Desktop.
Corona SDK: Config.lua for display options covering all iOS device resolutions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local targetDevice = ( system.getInfo( "model" ) ) | |
local isTall = ( "iPhone" == system.getInfo( "model" ) ) and ( display.pixelHeight > 960 ) | |
if isTall == false and targetDevice == "iPhone" then | |
application = | |
{ | |
content = | |
{ | |
width = 320, | |
height = 480, | |
scale = "letterbox", | |
fps = 60, | |
antialias = true, | |
xalign = "center", | |
yalign = "center", | |
imageSuffix = | |
{ | |
["@2x"] = 2, | |
}, | |
}, | |
} | |
elseif isTall == true then | |
application = | |
{ | |
content = | |
{ | |
width = 320, | |
height = 568, | |
fps = 60, | |
antialias = true, | |
xalign = "center", | |
yalign = "center", | |
}, | |
} | |
elseif targetDevice == "iPad" then | |
application = | |
{ | |
content = | |
{ | |
width = 768, | |
height = 1024, | |
scale = "letterbox", | |
fps = 60, | |
antialias = true, | |
xalign = "center", | |
yalign = "center", | |
imageSuffix = | |
{ | |
["@2x"] = 2, | |
}, | |
}, | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment