Skip to content

'present cannot be called while a Canvas is active.' error from callbacks.lua #56

Description

@rileyladell

I am making a game with LOVE2D ver. 11.5 and tried to set up push using this code:

local push = require "lib.push"

local gameWidth, gameHeight = 1280, 720 --fixed game resolution
local windowWidth, windowHeight = love.window.getDesktopDimensions()
windowWidth, windowHeight = windowWidth*.7, windowHeight*.7 --make the window a bit smaller than the screen itself

push:setupScreen(gameWidth, gameHeight, windowWidth, windowHeight, {fullscreen = false})

love.draw()
push:start()
--my drawing logic here
push:finish()
end

but when I run my game, I get an error:

Image

"[love "callbacks.lua"]:170: present cannot be called while a Canvas is active."

EDIT #1:
So I fixed that issue by passing 'canvas = false' on push:setupScreen(), but now there is a new issue: when I run my game, it will start pretty normally for the first few seconds, then give me an error:

Image I'm not sure why the stack depth is getting too high.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions