SDL/include/SDL3
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
..
SDL.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_assert.h Fixes for Android builds 2023-01-31 08:39:51 -08:00
SDL_atomic.h SDL_atomic.h: Update SDL_CPUPauseInstruction for Watcom. (#7157) 2023-01-26 17:01:56 +03:00
SDL_audio.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_begin_code.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_bits.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_blendmode.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_clipboard.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_close_code.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_copying.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_cpuinfo.h Replaced SDL_SIMDAlloc(), SDL_SIMDRealloc(), and SDL_SIMDFree() with SDL_aligned_alloc() and SDL_aligned_free() 2023-01-09 18:01:59 -08:00
SDL_egl.h vita: fix PVR_PSP2 (GLES) + gl4es4fita (GL) 2023-01-25 00:23:05 +01:00
SDL_endian.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_error.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_events.h Changed SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED to be the same value as SDL_EVENT_WINDOW_SIZE_CHANGED so SDL2 applications continue to work as expected. 2023-01-29 21:37:51 -08:00
SDL_filesystem.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_gamepad.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_guid.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_haptic.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_hidapi.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_hints.h SDL 3.0 is going to be high DPI aware and officially separates screen… (#7145) 2023-01-25 01:23:17 -08:00
SDL_init.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_intrin.h Fixed filename comment in SDL_intrin.h 2023-01-10 21:05:38 -08:00
SDL_joystick.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_keyboard.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_keycode.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_loadso.h SDL_loadso.h: add missing SDLCALL to SDL_LoadFunction() 2023-01-26 18:01:10 +03:00
SDL_locale.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_log.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_main.h Sync SDL3 wiki -> header 2023-01-25 18:02:19 +00:00
SDL_main_impl.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_messagebox.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_metal.h Remove SDL_GL/Metal/Vulkan_GetDrawableSize(). 2023-01-29 11:20:33 -08:00
SDL_misc.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_mouse.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_mutex.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_name.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_oldnames.h Windows default to fullscreen desktop mode if they don't pick an explicit video mode 2023-02-01 12:05:25 -08:00
SDL_opengl.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_opengl_glext.h Switch header convention from #include "SDL.h" to #include <SDL3/SDLh> 2022-11-26 22:15:18 -08:00
SDL_opengles.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_opengles2.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_opengles2_gl2.h Switch header convention from #include "SDL.h" to #include <SDL3/SDLh> 2022-11-26 22:15:18 -08:00
SDL_opengles2_gl2ext.h Switch header convention from #include "SDL.h" to #include <SDL3/SDLh> 2022-11-26 22:15:18 -08:00
SDL_opengles2_gl2platform.h Switch header convention from #include "SDL.h" to #include <SDL3/SDLh> 2022-11-26 22:15:18 -08:00
SDL_opengles2_khrplatform.h Switch header convention from #include "SDL.h" to #include <SDL3/SDLh> 2022-11-26 22:15:18 -08:00
SDL_pixels.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_platform.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_platform_defines.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_power.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_quit.h Renamed SDL events for clarity 2023-01-24 07:26:48 -08:00
SDL_rect.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_render.h include: make SDL_RenderPresent thread safety notes less verbose. 2023-01-25 13:15:34 -05:00
SDL_revision.h Removed SDL_REVISION_NUMBER 2023-01-06 09:53:18 -08:00
SDL_rwops.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_scancode.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_sensor.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_shape.h SDL_WINDOW_INPUT_GRABBED has been renamed SDL_WINDOW_MOUSE_GRABBED 2023-01-28 10:56:38 -08:00
SDL_stdinc.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_surface.h Sync wiki -> headers. 2023-01-25 13:01:40 -05:00
SDL_system.h Displays are now referenced by instance ID instead of index 2023-01-29 19:25:15 -08:00
SDL_syswm.h Renamed SDL events for clarity 2023-01-24 07:26:48 -08:00
SDL_test.h Moved testautomation data out of SDL_test library 2023-01-26 10:25:44 -08:00
SDL_test_assert.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_test_common.h Windows default to fullscreen desktop mode if they don't pick an explicit video mode 2023-02-01 12:05:25 -08:00
SDL_test_compare.h Moved testautomation data out of SDL_test library 2023-01-26 10:25:44 -08:00
SDL_test_crc32.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_test_font.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_test_fuzzer.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_test_harness.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_test_log.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_test_md5.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_test_memory.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_test_random.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_thread.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_timer.h Fixed building with Visual Studio 2010 2023-01-09 18:30:23 -08:00
SDL_touch.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_version.h Updated copyright for 2023 2023-01-09 09:41:41 -08:00
SDL_video.h Windows default to fullscreen desktop mode if they don't pick an explicit video mode 2023-02-01 12:05:25 -08:00
SDL_vulkan.h Remove SDL_GL/Metal/Vulkan_GetDrawableSize(). 2023-01-29 11:20:33 -08:00