From e9b3440b506b468ab15dd3f752dabb607d76389b Mon Sep 17 00:00:00 2001 From: UnevenBird Date: Thu, 30 Jan 2025 23:03:09 +0400 Subject: [PATCH] Fixed delay in changing window icon on boot --- src/modules/love/boot.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/love/boot.lua b/src/modules/love/boot.lua index c35ac23eb..65833c9b3 100644 --- a/src/modules/love/boot.lua +++ b/src/modules/love/boot.lua @@ -383,6 +383,11 @@ function love.init() -- Setup window here. if c.window and c.modules.window then + if c.window.icon then + 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 + love.window.setTitle(c.window.title or c.title) assert(love.window.setMode(c.window.width, c.window.height, { @@ -404,10 +409,6 @@ function love.init() x = c.window.x, y = c.window.y, }), "Could not set window mode") - if c.window.icon then - 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 -- The first couple event pumps on some systems (e.g. macOS) can take a