Skip to content

Commit c6ae9cd

Browse files
committed
fix(splash): Correct image data loading for love.js
The previous method of creating a `FileData` object using `love.filesystem.newFileData` is not compatible with the love.js web implementation.
1 parent 9b38fa8 commit c6ae9cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

game/simple_splash/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ function SimpleSplash.new(width, height)
1818
self.done = false
1919
self.alpha = 1
2020
local decoded = love.data.decode("data", "base64", SimpleSplash.CUBAN_FLAG)
21-
local fileData = love.filesystem.newFileData(decoded, "flag.png")
22-
local imageData = love.image.newImageData(fileData)
21+
---@diagnostic disable-next-line: param-type-mismatch
22+
local imageData = love.image.newImageData(decoded)
2323
self.flagImage = love.graphics.newImage(imageData)
2424

2525
self.loading_text = "LOADING..."

0 commit comments

Comments
 (0)