mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
Merged default into minor
--HG-- branch : minor
This commit is contained in:
@@ -343,12 +343,11 @@ function love.init()
|
||||
|
||||
-- Yes, conf.lua might not exist, but there are other ways of making
|
||||
-- love.conf appear, so we should check for it anyway.
|
||||
local confok, conferr
|
||||
if love.conf then
|
||||
local ok, err = pcall(love.conf, c)
|
||||
if not ok then
|
||||
print(err)
|
||||
-- continue
|
||||
end
|
||||
confok, conferr = pcall(love.conf, c)
|
||||
-- If love.conf errors, we'll trigger the error after loading modules so
|
||||
-- the error message can be displayed in the window.
|
||||
end
|
||||
|
||||
if love.arg.options.console.set then
|
||||
@@ -387,6 +386,10 @@ function love.init()
|
||||
love.createhandlers()
|
||||
end
|
||||
|
||||
if not confok and conferr then
|
||||
error(conferr)
|
||||
end
|
||||
|
||||
-- Setup window here.
|
||||
if c.window and c.modules.window then
|
||||
assert(love.window.setMode(c.window.width, c.window.height,
|
||||
@@ -1552,7 +1555,7 @@ function love.errhand(msg)
|
||||
local font = love.graphics.setNewFont(math.floor(14 * love.window.getPixelScale()))
|
||||
|
||||
local sRGB = select(3, love.window.getMode()).srgb
|
||||
if sRGB then
|
||||
if sRGB and love.math then
|
||||
love.graphics.setBackgroundColor(love.math.gammaToLinear(89, 157, 220))
|
||||
else
|
||||
love.graphics.setBackgroundColor(89, 157, 220)
|
||||
|
||||
Reference in New Issue
Block a user