Skip to content

Commit

Permalink
Fixed delay in changing window icon on boot
Browse files Browse the repository at this point in the history
  • Loading branch information
UnevenBird committed Feb 1, 2025
1 parent 0d21908 commit e9b3440
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/modules/love/boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
{
Expand All @@ -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
Expand Down

0 comments on commit e9b3440

Please sign in to comment.