I'm trying to configure Corona so it can automatically choose the images depending on the platform. In my project directory I have three files :
* titlecard.png - 320 x 480
* titlecard@2.png - 640 x 960
* titlecard-ipad.png - 768 x 1024
And this is my config file.....
-- config.lua
print(system.getInfo("model"))
if system.getInfo("model") == "iPad" then
application = {
content = {
width = 768,
height = 1024,
scale = "none",
imageSuffix = {
["-ipad"] = 1
},
},
}
else
application = {
content = {
width = 320,
height = 480,
scale = "zoomeven",
imageSuffix = {
["@2"] = 2
}
}
}
end
This is what gets loaded in the different environments :
* simulator - titlecard.png (expected)
* iphone4 - titlecard@2.png (expected)
* ipad2 - titlecard.png (not expected)
The print command says that the model is iPad so I'm not sure why it isn't loading.
Can anyone set me straight here.
Thanks in advance,
Scott.