Updated to latest love-android code (b615972822cb)

This commit is contained in:
fysx
2015-08-13 17:21:53 +02:00
parent f3dd769e98
commit 9cbddc2f5e
50 changed files with 827 additions and 663 deletions
+9 -12
View File
@@ -351,7 +351,6 @@ function love.init()
resizable = false,
centered = true,
highdpi = false,
srgb = false,
},
modules = {
event = true,
@@ -375,6 +374,7 @@ function love.init()
identity = false,
appendidentity = false,
accelerometerjoystick = true, -- Only relevant for Android / iOS.
gammacorrect = false,
}
-- Console hack, part 1.
@@ -408,6 +408,10 @@ function love.init()
love._setAccelerometerAsJoystick(c.accelerometerjoystick)
end
if love._setGammaCorrect then
love._setGammaCorrect(c.gammacorrect)
end
-- Gets desired modules.
for k,v in ipairs{
"thread",
@@ -441,8 +445,8 @@ function love.init()
if not love.isVersionCompatible(c.version) then
local major, minor, revision = c.version:match("^(%d+)%.(%d+)%.(%d+)$")
if (not major or not minor or not revision) or (major ~= love._version_major and minor ~= love._version_minor) then
local msg = "This game was made for a different version of LOVE.\n"..
"It may not be not be compatible with the running version ("..love._version..")."
local msg = ("This game indicates it was made for version '%s' of LOVE.\n"..
"It may not be compatible with the running version (%s)."):format(c.version, love._version)
print(msg)
@@ -471,13 +475,12 @@ function love.init()
centered = c.window.centered,
display = c.window.display,
highdpi = c.window.highdpi,
srgb = c.window.srgb,
x = c.window.x,
y = c.window.y,
}), "Could not set window mode")
love.window.setTitle(c.window.title or c.title)
if c.window.icon then
assert(love.image, "If an icon is set in love.conf, love.image has to be loaded!")
assert(love.image, "If an icon is set in love.conf, love.image must be loaded!")
love.window.setIcon(love.image.newImageData(c.window.icon))
end
end
@@ -589,13 +592,7 @@ function love.errhand(msg)
love.graphics.reset()
local font = love.graphics.setNewFont(math.floor(love.window.toPixels(14)))
local sRGB = select(3, love.window.getMode()).srgb
if sRGB and love.math then
love.graphics.setBackgroundColor(love.math.gammaToLinear(89, 157, 220))
else
love.graphics.setBackgroundColor(89, 157, 220)
end
love.graphics.setBackgroundColor(89, 157, 220)
love.graphics.setColor(255, 255, 255, 255)
local trace = debug.traceback()