My monitor is 1440x900 and I’m running Windows 10. I have the following in my render script’s update function:
print(render.get_width().."x"..render.get_height())
print(render.get_window_width().."x"..render.get_window_height())
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:
DEBUG:SCRIPT: 1840x494
DEBUG:SCRIPT: 1366x768
DEBUG:SCRIPT: 840x1494
DEBUG:SCRIPT: 1280x1024
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.