Page 1 of 1

fullscreen on projector, television and retinal displays

Posted: Wed Jan 15, 2014 11:58 pm
by wilbefast
Hi all,

Just managed to fix a weird bug that reported in my game "Eggz" and figured the solution might be useful to someone.

The bug was: on really big screens I get, for some reason, a view on a tiny corner of the game. The television I'm testing on reset its resolution to 800x600 but Löve still reported 1920x1080 as a valid resolution and set it successfully. The result is an image that doesn't fit in the screen, which has mysteriously been set to 800x600.

The reason the screen is set to this low resolution seems to be that fullscreen is set to true in love.conf:

Code: Select all

t.window.fullscreen = true
Löve creates a default window at 800x600 fullscreen, the television automatically adapts its resolution to compensate. It's not until later that the window.setMode shows up and sets the resolution to 1920x1080 - for some reason by this time it is too late as the windows already exists: the television doesn't reset its resolution a second time and to add insult to injury I'm stuck with an 800x600 resolution after I exit the game.

This problem occurs on large televisions, projectors and retinal displays.

Re: fullscreen on projector, television and retinal displays

Posted: Thu Jan 16, 2014 8:25 pm
by Ranguna259
Apparently the resolutions isn't updating.. Have you tried resetting fullscreen in setMode() ?

Re: fullscreen on projector, television and retinal displays

Posted: Fri Jan 17, 2014 12:56 am
by wilbefast
Have you tried resetting fullscreen in setMode() ?
My setMode has a { fullscreen = true } in it, yes. Perhaps setting fullscreen to false and then back again might work - sadly I only had access to the big television yesterday. getMode revealed that the explicit setMode in my had indeed been taken into account by Löve, but that the telelvision resets its resolution only on the first mode change (the one caused by the configuration file).