Skip to content

Instantly share code, notes, and snippets.

@RSCdev
Forked from deanPGM/config.lua
Created October 1, 2012 15:16
Show Gist options
  • Save RSCdev/3812406 to your computer and use it in GitHub Desktop.
Save RSCdev/3812406 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
@RSCdev
Copy link
Author

RSCdev commented Oct 1, 2012

Great share @crafty!

Cheers,
@RSCdev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment