eternalcodes / EternalJK

Effort to maintain and improve OpenJK
GNU General Public License v2.0
60 stars 23 forks source link

Restrict fullscreen mode logic to fullscreen windows #107

Closed cagelight closed 11 months ago

cagelight commented 4 years ago

Fullscreen logic is incorrectly being applied to windowed instances, artificially and pointlessly limiting supported resolutions.

Bucky21659 commented 4 years ago

What problems was this causing before? Was this keeping the renderer from starting up under some circumstances? If so, what system & environment caused this to happen? Maybe it should automatically set r_fullscreen 0 here?

Seeing this now I'm wondering if there's even a good reason fort to error out when GLimp_DetectAvailableModes() fails, since it only seems to set the r_availableModes cvar, which isn't being used for anything at the moment. It'd only make sense if the r_mode resolutions were actually the detected ones from SDL, but they aren't aside from -2 I think.

cagelight commented 4 years ago

I was trying to start the game in windowed mode, in a resolution that wasn't supported by exclusive fullscreen display, and as a result it fell back to the default resolution. This PR fixed that problem for me.

Bucky21659 commented 4 years ago

What OS?

I've never had issues setting weird/arbitrary resolutions like 1820x1072 or anything on Windows or Linux.

cagelight commented 4 years ago

I'm on Linux, interesting that you don't experience the problem.

Bucky21659 commented 4 years ago

Yeah, probably something DE specific. Regardless, if this fixes the issue for you then I'll go ahead and merge it.