Skip to content

Instantly share code, notes, and snippets.

@codepaladin
Created June 24, 2014 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codepaladin/f17194932197ea3aa91e to your computer and use it in GitHub Desktop.
Save codepaladin/f17194932197ea3aa91e to your computer and use it in GitHub Desktop.
Config File
-- taken from http://coronalabs.com/blog/2013/09/10/modernizing-the-config-lua/
--calculate the aspect ratio of the device
local aspectRatio = display.pixelHeight / display.pixelWidth
application = {
content = {
width = aspectRatio > 1.5 and 800 or math.ceil( 1200 / aspectRatio ),
height = aspectRatio < 1.5 and 1200 or math.ceil( 800 * aspectRatio ),
scale = "letterBox",
fps = 30,
imageSuffix = {
["@2x"] = 1.3,
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment