Skip to content

Instantly share code, notes, and snippets.

@StevenWarren
Last active June 10, 2016 18:00
Show Gist options
  • Save StevenWarren/8c7b50c0c10142682c1e263719b7c54b to your computer and use it in GitHub Desktop.
Save StevenWarren/8c7b50c0c10142682c1e263719b7c54b to your computer and use it in GitHub Desktop.
A bug in Corona SDK on iPad2 causes images not to scale to full screen. This override forces every image to load at its exact resolution. All credit goes to Bomzy Apps and Dave Grant.
local _newImage = display.newImage
display.newImage = function(...)
local lastArg = arg[#arg]
if(lastArg ~= true) then
arg[#arg+1] = true
end
return _newImage(unpack(arg))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment