Skip to content

Instantly share code, notes, and snippets.

@deanPGM
Created September 19, 2012 18:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save deanPGM/3751257 to your computer and use it in GitHub Desktop.
Save deanPGM/3751257 to your computer and use it in GitHub Desktop.
Corona SDK: Config.lua for display options covering all iOS device resolutions.
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