Skip to content

Commit 7197d9c

Browse files
tatater56s-ol
authored andcommitted
fix love 11.0 removed SpriteBatch:setBufferSize
1 parent 6c6ff93 commit 7197d9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

o-ten-one/init.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ function splashlib.new(init)
8383

8484
batch:clear()
8585

86-
if batch:getBufferSize() < batch_w * batch_h then
86+
-- Love 11.0 Removed SpriteBatch:setBufferSize, spritebatches now automatically grow when they run out of space.
87+
-- https://love2d.org/wiki/SpriteBatch:setBufferSize
88+
local major, minor = love.getVersion()
89+
if major == 0 and minor < 11 and batch:getBufferSize() < batch_w * batch_h then
8790
batch:setBufferSize(batch_w * batch_h)
8891
end
8992

0 commit comments

Comments
 (0)