mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-21 04:35:23 +08:00
Folded SDL_WINDOW_FULLSCREEN_EXCLUSIVE and SDL_WINDOW_FULLSCREEN_DESKTOP into a single SDL_WINDOW_FULLSCREEN flag
The fullscreen video mode used by the window can be used to determine whether it's in exclusive fullscreen or fullscreen desktop mode.
This commit is contained in:
@@ -419,7 +419,6 @@
|
||||
#define SDL_GetWindowDisplayIndex SDL_GetDisplayForWindow
|
||||
#define SDL_GetWindowDisplayMode SDL_GetWindowFullscreenMode
|
||||
#define SDL_SetWindowDisplayMode SDL_SetWindowFullscreenMode
|
||||
#define SDL_WINDOW_FULLSCREEN SDL_WINDOW_FULLSCREEN_EXCLUSIVE
|
||||
#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_MOUSE_GRABBED
|
||||
|
||||
#elif !defined(SDL_DISABLE_OLD_NAMES)
|
||||
@@ -805,7 +804,6 @@
|
||||
#define SDL_GetWindowDisplayIndex SDL_GetWindowDisplayIndex_renamed_SDL_GetDisplayForWindow
|
||||
#define SDL_GetWindowDisplayMode SDL_GetWindowDisplayMode_renamed_SDL_GetWindowFullscreenMode
|
||||
#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_renamed_SDL_SetWindowFullscreenMode
|
||||
#define SDL_WINDOW_FULLSCREEN SDL_WINDOW_FULLSCREEN_renamed_SDL_WINDOW_FULLSCREEN_EXCLUSIVE
|
||||
#define SDL_WINDOW_INPUT_GRABBED SDL_WINDOW_INPUT_GRABBED_renamed_SDL_WINDOW_MOUSE_GRABBED
|
||||
|
||||
#endif /* SDL_ENABLE_OLD_NAMES */
|
||||
|
||||
@@ -59,7 +59,7 @@ extern "C" {
|
||||
* ::SDL_WINDOW_MOUSE_GRABBED, ::SDL_WINDOW_HIDDEN,
|
||||
* ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
|
||||
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_BORDERLESS is always set,
|
||||
* and ::SDL_WINDOW_FULLSCREEN_MASK is always unset.
|
||||
* and ::SDL_WINDOW_FULLSCREEN is always unset.
|
||||
* \return the window created, or NULL if window creation failed.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
|
||||
@@ -80,6 +80,7 @@ typedef struct
|
||||
float scale;
|
||||
int depth;
|
||||
float refresh_rate;
|
||||
SDL_bool fullscreen_exclusive;
|
||||
SDL_DisplayMode fullscreen_mode;
|
||||
int num_windows;
|
||||
SDL_Window **windows;
|
||||
|
||||
@@ -107,7 +107,7 @@ typedef struct SDL_Window SDL_Window;
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_WINDOW_FULLSCREEN_EXCLUSIVE = 0x00000001, /**< window is in fullscreen exclusive mode */
|
||||
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< window is in fullscreen mode */
|
||||
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
|
||||
/* 0x00000004 was SDL_WINDOW_SHOWN in SDL2, please reserve this bit for sdl2-compat. */
|
||||
SDL_WINDOW_HIDDEN = 0x00000008, /**< window is not visible */
|
||||
@@ -118,7 +118,7 @@ typedef enum
|
||||
SDL_WINDOW_MOUSE_GRABBED = 0x00000100, /**< window has grabbed mouse input */
|
||||
SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */
|
||||
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
||||
SDL_WINDOW_FULLSCREEN_DESKTOP = 0x00001000, /**< window is in fullscreen desktop mode */
|
||||
/* 0x00001000 was SDL_WINDOW_FULLSCREEN_DESKTOP in SDL2, please reserve this bit for sdl2-compat. */
|
||||
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
||||
/* 0x00002000 was SDL_WINDOW_ALLOW_HIGHDPI in SDL2, please reserve this bit for sdl2-compat. */
|
||||
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
|
||||
@@ -133,8 +133,6 @@ typedef enum
|
||||
|
||||
} SDL_WindowFlags;
|
||||
|
||||
#define SDL_WINDOW_FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN_EXCLUSIVE | SDL_WINDOW_FULLSCREEN_DESKTOP)
|
||||
|
||||
/**
|
||||
* \brief Used to indicate that you don't care what the window position is.
|
||||
*/
|
||||
@@ -614,9 +612,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window *window);
|
||||
*
|
||||
* `flags` may be any of the following OR'd together:
|
||||
*
|
||||
* - `SDL_WINDOW_FULLSCREEN_EXCLUSIVE`: fullscreen window, switching display
|
||||
* mode to the closest fullscreen resolution
|
||||
* - `SDL_WINDOW_FULLSCREEN_DESKTOP`: fullscreen window at desktop resolution
|
||||
* - `SDL_WINDOW_FULLSCREEN`: fullscreen window at desktop resolution
|
||||
* - `SDL_WINDOW_OPENGL`: window usable with an OpenGL context
|
||||
* - `SDL_WINDOW_VULKAN`: window usable with a Vulkan instance
|
||||
* - `SDL_WINDOW_METAL`: window usable with a Metal instance
|
||||
|
||||
Reference in New Issue
Block a user