SDL2/build-scripts
Sam Lantinga 6b137579ea Windows default to fullscreen desktop mode if they don't pick an explicit video mode
Rather than iterating over display modes using an index, there is a new function SDL_GetFullscreenDisplayModes() to get the list of available fullscreen modes on a display.
{
    SDL_DisplayID display = SDL_GetPrimaryDisplay();
    int num_modes = 0;
    SDL_DisplayMode **modes = SDL_GetFullscreenDisplayModes(display, &num_modes);
    if (modes) {
        for (i = 0; i < num_modes; ++i) {
            SDL_DisplayMode *mode = modes[i];
            SDL_Log("Display %" SDL_PRIu32 " mode %d:  %dx%d@%gHz, %d%% scale\n",
                    display, i, mode->pixel_w, mode->pixel_h, mode->refresh_rate, (int)(mode->display_scale * 100.0f));
        }
        SDL_free(modes);
    }
}

SDL_GetDesktopDisplayMode() and SDL_GetCurrentDisplayMode() return pointers to display modes rather than filling in application memory.

Windows now have an explicit fullscreen mode that is set, using SDL_SetWindowFullscreenMode(). The fullscreen mode for a window can be queried with SDL_GetWindowFullscreenMode(), which returns a pointer to the mode, or NULL if the window will be fullscreen desktop. SDL_SetWindowFullscreen() just takes a boolean value, setting the correct fullscreen state based on the selected mode.
2023-02-01 12:05:25 -08:00
..
android-prefab.sh cmake: no more SDL3_* cache variables 2023-01-31 01:59:21 +01:00
androidbuild.sh Updated Android build tools version, which bumped minimum deployment target to API 14 2017-10-23 23:23:47 -07:00
androidbuildlibs.sh Remove SDL3_main from build systems, remove most of src/main/* 2022-12-15 08:01:01 -08:00
clang-format-src.sh Update for SDL3 coding style (#6717) 2022-11-30 12:51:59 -08:00
cmake-toolchain-mingw64-i686.cmake Added toolchain files for cross-compiling to Windows 2022-11-25 15:37:30 -08:00
cmake-toolchain-mingw64-x86_64.cmake Added toolchain files for cross-compiling to Windows 2022-11-25 15:37:30 -08:00
codechecker-buildbot.sh cmake: Prefix all options with "SDL_" 2021-10-05 10:45:26 -04:00
fnsince.pl Unify all the SDL_*RunApp() functions into just SDL_RunApp() 2022-12-15 08:01:01 -08:00
gen_audio_channel_conversion.c Updated copyright for 2023 2023-01-09 09:41:41 -08:00
gen_audio_resampler_filter.c Revert "gen_audio_resampler_filter: Use SDL_PI_F" 2023-01-16 10:04:22 +01:00
git-pre-push-hook.pl git-pre-push-hook: remove ".git" from URL. 2021-03-17 13:36:38 -04:00
mkinstalldirs build-scripts: update install-sh and mkinstalldirs from automake-1.16.3 2020-12-24 01:32:10 +03:00
rename_api.py SDL_migration.cocci / rename_api.py: handle migration of enum/structure 2023-01-11 23:33:14 +01:00
rename_headers.py Catch SDL_opengles2.h in rename_headers.py 2023-01-10 15:25:48 -08:00
rename_symbols.py Fixed parsing symbols from SDL_oldnames.h 2023-01-04 13:51:00 -08:00
SDL_migration.cocci Windows default to fullscreen desktop mode if they don't pick an explicit video mode 2023-02-01 12:05:25 -08:00
showrev.sh Switch header convention from #include "SDL.h" to #include <SDL3/SDLh> 2022-11-26 22:15:18 -08:00
strip_fPIC.sh Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
test-versioning.sh cmake: pass VERSION to project() + don't use SDL_VERSION 2023-01-31 01:59:21 +01:00
update-copyright.sh Speed up processing of update-copyright.sh 2023-01-09 09:38:36 -08:00
update-version.sh cmake: pass VERSION to project() + don't use SDL_VERSION 2023-01-31 01:59:21 +01:00
updaterev.sh Switch header convention from #include "SDL.h" to #include <SDL3/SDLh> 2022-11-26 22:15:18 -08:00
wikiheaders.pl wikiheaders: Allow markdown in the wikipreamble string. 2023-01-26 14:45:57 -05:00