Deprecate SDL_INIT_EVERYTHING from SDL2

Adds SDL_INIT_EVERYTHING to the deprecated symbol list, and renames an internal usage to avoid a warning.

(cherry picked from commit e7199cad0b)
This commit is contained in:
Frank Praznik
2026-03-03 14:00:40 -05:00
parent b36a5ab6f4
commit 18a0157457
2 changed files with 4 additions and 3 deletions

View File

@@ -1325,6 +1325,7 @@
#define SDL_GetWindowDisplayIndex SDL_GetWindowDisplayIndex_renamed_SDL_GetDisplayForWindow
#define SDL_GetWindowDisplayMode SDL_GetWindowDisplayMode_renamed_SDL_GetWindowFullscreenMode
#define SDL_HasWindowSurface SDL_HasWindowSurface_renamed_SDL_WindowHasSurface
#define SDL_INIT_EVERYTHING SDL_INIT_EVERYTHING_deprecated_list_flags_explicitly
#define SDL_IsScreenSaverEnabled SDL_IsScreenSaverEnabled_renamed_SDL_ScreenSaverEnabled
#define SDL_SetWindowDisplayMode SDL_SetWindowDisplayMode_renamed_SDL_SetWindowFullscreenMode
#define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_ALLOW_HIGHDPI_renamed_SDL_WINDOW_HIGH_PIXEL_DENSITY

View File

@@ -65,7 +65,7 @@
#include "core/android/SDL_android.h"
#endif
#define SDL_INIT_EVERYTHING ~0U
#define SDL_ALL_SUBSYSTEM_FLAGS ~0U
// Initialization/Cleanup routines
#include "timer/SDL_timer_c.h"
@@ -682,7 +682,7 @@ Uint32 SDL_WasInit(SDL_InitFlags flags)
}
if (!flags) {
flags = SDL_INIT_EVERYTHING;
flags = SDL_ALL_SUBSYSTEM_FLAGS;
}
num_subsystems = SDL_min(num_subsystems, SDL_MostSignificantBitIndex32(flags) + 1);
@@ -707,7 +707,7 @@ void SDL_Quit(void)
#ifdef SDL_PLATFORM_WINDOWS
SDL_HelperWindowDestroy();
#endif
SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
SDL_QuitSubSystem(SDL_ALL_SUBSYSTEM_FLAGS);
SDL_CleanupTrays();
#ifdef SDL_USE_LIBDBUS