You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function love.load()
push = require 'push'
push:setupScreen(1920, 1080, 0, 0)
end
function love.draw()
push:start()
love.graphics.rectangle('fill',10,10,100,100)
push:finish()
end
A window running at my desktop resolution opens but nothing within push:start() and push:finish() draws. If I move love.graphics.rectangle to be after push:finish it does draw.
If I change window width & height to any other value, either in push:setupScreen or by calling push:resize rectangle does draw.
The text was updated successfully, but these errors were encountered:
Hi, sorry if I'm wrong, but while 0x0 is technically an invalid resolution, the pull request seems to add more of an enhancement rather than a bugfix. It would probably make more sense for push to detect whether windowWidth and windowHeight are nil and default to the desktop dimensions if so, instead of 0 or less which should probably throw an error instead.
I'll leave this open for a few days in case there's something I'm missing, though.
My thinking was to make push:setupScreen mirror the beheaviour of love.window.setMode, where if you give it a width/height of 0 it sets them to desktop resolution. https://love2d.org/wiki/love.window.setMode
"If width or height is 0, setMode will use the width and height of the desktop."
At any rate the current beheaviour should probably be changed, where the window is launched at desktop resolution but can't be drawn to within push:start and push:finish.
Also my pull request is only checking for == 0, if you put in a value less than 0 (or nil) it returns an error.
The minimal code to reproduce the issue:
function love.load()
push = require 'push'
push:setupScreen(1920, 1080, 0, 0)
end
function love.draw()
push:start()
love.graphics.rectangle('fill',10,10,100,100)
push:finish()
end
A window running at my desktop resolution opens but nothing within push:start() and push:finish() draws. If I move love.graphics.rectangle to be after push:finish it does draw.
If I change window width & height to any other value, either in push:setupScreen or by calling push:resize rectangle does draw.
The text was updated successfully, but these errors were encountered: