Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated method love.graphics.isCreated from love.errhand #1719

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sheepolution
Copy link

love.graphics.isCreated was removed in 0.9.0 according to the wiki.

@MikuAuahDark
Copy link
Contributor

MikuAuahDark commented Aug 3, 2021

I'm not quite sure about this.

{ "isCreated", w_isCreated },

int w_isCreated(lua_State *L)
{
luax_pushboolean(L, instance()->isCreated());
return 1;
}

Slime probably can explain?

@slime73
Copy link
Member

slime73 commented Nov 20, 2021

I did a bit of investigating - love.window.isOpen was added in version 0.9 when window-related functions were moved to their own module. I think love.graphics.isCreated stuck around because it says whether a graphics context is created rather than just whether a window is open - but I think love's internal code makes sure a graphics context is always created if a window is open, when the graphics module is active.

So if that's true, the correct thing might be to mark isCreated as deprecated (and remove the call from the error handler code as well). In any case the wiki isn't accurate right now.

Copy link
Member

@slime73 slime73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the error handler code moved since this PR was made too, so it will need to be redone (along with marking the function as deprecated), if that's the route people want to take.

That being said, I'm not entirely positive the function has no use in future love versions when other graphics backends are used. I'd have to think more about it (and closely look at my metal code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants