Issue #526 wontfix

Additional display-related functions

created an issue

I've seen lovers store a variable for whether the display is fullscreen or not a few times, so I'd suggest having be available.

There are also other display-related functions which seem like they would be useful: setFullscreen, setWidth/Height, set/getFSAA, set/getVsync.

All these things could be done with set/getMode, but I think it would be more intuitive and consistent with the rest of the API if they were able to be accessed and changed individually.

Edit: Actually some/all of these might not be necessary (would people really change only the width or height of the screen enough that these functions are worth having?) or might be kind of weird in a scenario like this:

function love.conf(t)
    t.screen = false

function love.load() = true
    -- The screen has no dimensions, so what happens?

Comments (3)

  1. rude repo owner

    It should be OK to implement and other getters ... but we should not implement individual setting of display mode properties. When you change the display mode in fullscreen, the OpenGL context is destroyed, and all OpenGL resources must be recreated. Also (perhaps related to that), the driver (or whatever) takes way too long to "recover" when changing display mode. It would not be nice to have games make small incremental changes, and fully apply each increment along the way. This will delay whatever you're trying to do with seconds (screen flashing like crazy), and it's always the wrong way of doing it.

    The correct way is submitting all the changes in one operation.

    Like we do now.

  2. Bart van Strien

    Personally, I think it is fine the way it is now, if anything toggleFullscreen would be removed. Like rude said, there's plenty of reasons not to allow random setters, regarding the random getters, getWidth/getHeight are simply wrapped because you need those a hell of a lot, the others can easily be obtained with getMode.

  3. Log in to comment