Ultimate config.lua questions

Hi everybody,

I had this discussion with Rob Miracle : http://coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/#comment-154531

So i need to know to make sure.

I only need to change this in the code : 

elseif display.pixelHeight / display.pixelWidth \> 1.72 then application = { content = { width = 320, height = 570, scale = “letterBox”, xAlign = “center”, yAlign = “center”, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, }

By ->

elseif display.pixelHeight / display.pixelWidth \> 1.72 then application = { content = { width = 640, height = 1140, scale = “letterBox”, xAlign = “center”, yAlign = “center”, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, }

and also : 

if string.sub(system.getInfo(“model”),1,4) == “iPad” then application = { content = { width = 360, height = 480, scale = “letterBox”, xAlign = “center”, yAlign = “center”, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, notification = { iphone = { types = { “badge”, “sound”, “alert” } } } }

By ->

if string.sub(system.getInfo(“model”),1,4) == “iPad” then application = { content = { width = 740, height = 960, scale = “letterBox”, xAlign = “center”, yAlign = “center”, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, notification = { iphone = { types = { “badge”, “sound”, “alert” } } } }

??

Thank you

I recommend to use this config file,

application = 

{

    content = 

    { 

        width = 640 * (display.pixelHeight/display.pixelWidth>1.5 and 1 or 1.5/(display.pixelHeight/display.pixelWidth)),

        height = 960 * (display.pixelHeight/display.pixelWidth<1.5 and 1 or (display.pixelHeight/display.pixelWidth)/1.5),

        scale = “letterbox”,

– xAlign = “center”,

– yAlign = “center”,

        imageSuffix =

        {

            ["@2x"] = 2,

            ["@4x"] = 3.0,

        },

    },

}

And while placing any object use display.viewableContentWidth and display.viewableContentHeight .

Eg : local rect = display.newRect(0,0,50,50)

rect.x = display.viewableContentWidth/2

rect.y = display.viewableContentHeight /2

thus it wil fit in the center of all type of devices.

width = 740,
height = 960,

probably should be:

width = 7_2_0,
height = 960,

I recommend to use this config file,

application = 

{

    content = 

    { 

        width = 640 * (display.pixelHeight/display.pixelWidth>1.5 and 1 or 1.5/(display.pixelHeight/display.pixelWidth)),

        height = 960 * (display.pixelHeight/display.pixelWidth<1.5 and 1 or (display.pixelHeight/display.pixelWidth)/1.5),

        scale = “letterbox”,

– xAlign = “center”,

– yAlign = “center”,

        imageSuffix =

        {

            ["@2x"] = 2,

            ["@4x"] = 3.0,

        },

    },

}

And while placing any object use display.viewableContentWidth and display.viewableContentHeight .

Eg : local rect = display.newRect(0,0,50,50)

rect.x = display.viewableContentWidth/2

rect.y = display.viewableContentHeight /2

thus it wil fit in the center of all type of devices.

width = 740,
height = 960,

probably should be:

width = 7_2_0,
height = 960,