Skip to content

Instantly share code, notes, and snippets.

@CoronaSDK
Forked from deanPGM/config.lua
Created May 15, 2013 21:46
Show Gist options
  • Save CoronaSDK/5587674 to your computer and use it in GitHub Desktop.
Save CoronaSDK/5587674 to your computer and use it in GitHub Desktop.
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