sdl-2

What's the difference between SDL_WINDOW_FULLSCREEN and SDL_WINDOW_FULLSCREEN_DESKTOP?


In SDL2, what is the difference between the window SDL_WINDOW_FULLSCREEN and SDL_WINDOW_FULLSCREEN_DESKTOP flags?

My current theory is that SDL_WINDOW_FULLSCREEN polls the actual hardware resolution while SDL_WINDOW_FULLSCREEN_DESKTOP polls the resolution in which the operating system is writing.


Solution

  • SDL2 wiki describes it in "Remarks" section.

    Fullscreen asks operating system to set specified video mode for calling application semi-exclusive use. Video mode may differ from current operating system's one. The downside is if you want to switch to another program with OS hotkeys, OS will have to switch video mode back, so you can't see your program running in background (and there is also a pause to switch video mode).

    Windowed-fullscreen is just ordinary windowed, but window size is set to match screen resolution and window decorations are disabled.

    You can find more information at e.g. http://pcgamingwiki.com/wiki/Glossary:Borderless_fullscreen_windowed