Skip to content

Instantly share code, notes, and snippets.

@nadar71
Forked from CoronaSDK/config.lua
Created January 26, 2017 13:35
Show Gist options
  • Save nadar71/9fa5a00e486a311b194602efa560b178 to your computer and use it in GitHub Desktop.
Save nadar71/9fa5a00e486a311b194602efa560b178 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