In my game.project file I have the width and height set to 840x494. With fullscreen unticked, as I resize the window I get correct sizes in the log. With the taskbar hidden and the window maximized I get:
DEBUG:SCRIPT: 840x494
DEBUG:SCRIPT: 1440x877
This is correct since the title bar is 23 pixels tall. However with the fullscreen setting in game.project ticked I get:
DEBUG:SCRIPT: 840x494
DEBUG:SCRIPT: 800x600
Even though I should be getting 1440x900, it’s drawing at 800x600 then stretching it to 1440x900 and making it distorted and blurry. Trying some other values for the width and height in game.project produce different results:
The renderer seems to be forced to one of a possible set of resolutions, which is not at all expected and doesn’t match the behaviour when fullscreen isn’t ticked. In windowed mode render.get_window_width() and render.get_window_height() return the client size of the window, which in fullscreen I would expect to be 1440x900.
isn’t this an issue with defold? fullscreen is rendering incorrectly, stretching the image instead of natively using the monitor resolution. this issue is still happening. an extension just to get a functioning fullscreen doesn’t make sense.
I think we need more information to consider it an issue or not, we haven’t had any bug reports regarding it for a long time. Do you have a repro case perhaps?
it could be my render script and not related to the original post. let’s find out:
for each window resize callback, the render target is changed to fill the window as much as pixel perfect possible. does fullscreen in game project settings trigger this callback? if not, this would cause this issue since the render target is not being resized when the window is fullscreen’d.
i need the functionality to toggle fullscreen, and if this is not possible with default defold scripting, i will try defOS.
i would very much like to ask this to be considered as a feature request, it makes defold feel like it is not a desktop-capable engine, which makes me sad.
Add me to the list of not working fullscreen feature. In my case render.get_window_width() returns 1024 instead of 1360. That’s probably the reason why I’m facing flickering problems.