-
-
Save phpedinei/3d8fc272a7674a296a15924738ef2bfc to your computer and use it in GitHub Desktop.
ultimate config.lua for corona sdk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 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 320 or math.ceil( 480 / aspectRatio ), | |
| height = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ), | |
| scale = "letterBox", | |
| fps = 30, | |
| imageSuffix = { | |
| ["@2x"] = 1.5, | |
| ["@4x"] = 3.0, | |
| }, | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment