2.0.7 SDL_WINDOW_FULLSCREEN stopped changing screen mode SDL_CreateWindow


#1

I’ve noticed 2.0.7 no longer changes the video display resolution when using the SDL_WINDOW_FULLSCREEN flag in SDL_CreateWindow(). This works in 2.0.5. Instead, a window is created at the desktop resolution. The w and h are ignored.

Then calling SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN) somehow works (but how does it know what w & h it should be?!), but forces the window to resize down from the desktop resolution it was created at.

Can anyone else confirm what’s going on?


#2

Which OS? I can’t reproduce on macOS; SDL_CreateWindow calls SDL_SetWindowFullscreen itself (via SDL_FinishWindowCreation) and does a mode change. My desktop resolution is 1440x900 points (2880x1800 pixels) and I called SDL_CreateWindow with width/height of 800x600, and flags of SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN and got an 800x600 (pixel) video mode.


#3

Ah - I think I can reproduce it on Windows 10 (Fall Creators Update).
Launching testgl2 with: --info all --geometry 800x600 --fullscreen, I get a 2880x1800 fullscreen mode. That is my desktop resolution. 800x600 is available in the list of modes logged to the console.


#4

Yes, I’m using Windows 10, you seem to be reproducing the problem. This worked in 2.0.5, so something changed since then. I can patch the problem for now by calling SDL_SetWindowFullscreen, but it’s not ideal.


#5

Is this caused by the “fullscreen optimizations”? I’m not sure if it is a new feature, but I am seeing a flood of complaints coming in after the Fall Creators Update. Can you turn it off and see if the original SDL_WINDOW_FULLSCREEN behavior returns?


#6

The documented behaviour has changed, so it’s definitely a bug. Where are these fullscreen optimizations you refer to?


#7

Ah, you mean the Windows compatibility option? I’m running it from Eclipse, so how do I change this option?


#8

Forgive me, if I post a link to a user’s screenshot. I don’t have this new version of windows installed yet. It’s the application’s properties.
https://www.7kfans.com/forums/viewtopic.php?f=13&t=877&p=7241#p7236


#9

I’ve disabled fullscreen optimizations in windows and that has no effect. It’s a bug that’s been introduced from 2.0.5 to 2.0.7.

Using SDL_SetWindowFullscreen() after will change the screen mode. It’s a way to patch it until SDL fixes it their end.

Welcome to the forums, by the way.