Răsfoiți Sursa

Renamed SDL_HINT_ALLOW_TOPMOST to SDL_HINT_WINDOW_ALLOW_TOPMOST

Sam Lantinga 1 an în urmă
părinte
comite
a5da7d0dd5

+ 4 - 0
build-scripts/SDL_migration.cocci

@@ -3008,3 +3008,7 @@ typedef SDL_version, SDL_Version;
 @@
 - SDL_version
 + SDL_Version
+@@
+@@
+- SDL_HINT_ALLOW_TOPMOST
++ SDL_HINT_WINDOW_ALLOW_TOPMOST

+ 3 - 0
docs/README-migration.md

@@ -724,6 +724,9 @@ The following hints have been removed:
 * Renamed environment variables SDL_VIDEODRIVER and SDL_AUDIODRIVER to SDL_VIDEO_DRIVER and SDL_AUDIO_DRIVER
 * The environment variables SDL_VIDEO_X11_WMCLASS and SDL_VIDEO_WAYLAND_WMCLASS have been removed and replaced with the unified hint SDL_HINT_APP_ID
 
+The following hints have been renamed:
+* SDL_HINT_ALLOW_TOPMOST => SDL_HINT_WINDOW_ALLOW_TOPMOST
+
 ## SDL_init.h
 
 The following symbols have been renamed:

+ 1 - 1
include/SDL3/SDL_hints.h

@@ -2338,7 +2338,7 @@ extern "C" {
  *
  * This hint can be set anytime.
  */
-#define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
+#define SDL_HINT_WINDOW_ALLOW_TOPMOST "SDL_WINDOW_ALLOW_TOPMOST"
 
 /**
  * A variable controlling whether the window frame and title bar are interactive when the cursor is hidden

+ 6 - 0
include/SDL3/SDL_oldnames.h

@@ -279,6 +279,9 @@
 #define SDL_JoystickIsHaptic SDL_IsJoystickHaptic
 #define SDL_MouseIsHaptic SDL_IsMouseHaptic
 
+/* ##SDL_hints.h */
+#define SDL_HINT_ALLOW_TOPMOST SDL_HINT_WINDOW_ALLOW_TOPMOST
+
 /* ##SDL_joystick.h */
 #define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMEPAD
 #define SDL_JoystickAttachVirtual SDL_AttachVirtualJoystick
@@ -751,6 +754,9 @@
 #define SDL_JoystickIsHaptic SDL_JoystickIsHaptic_renamed_SDL_IsJoystickHaptic
 #define SDL_MouseIsHaptic SDL_MouseIsHaptic_renamed_SDL_IsMouseHaptic
 
+/* ##SDL_hints.h */
+#define SDL_HINT_ALLOW_TOPMOST SDL_HINT_ALLOW_TOPMOST_renamed_SDL_HINT_WINDOW_ALLOW_TOPMOST
+
 /* ##SDL_joystick.h */
 #define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMECONTROLLER_renamed_SDL_JOYSTICK_TYPE_GAMEPAD
 #define SDL_JoystickAttachVirtual SDL_JoystickAttachVirtual_renamed_SDL_AttachVirtualJoystick

+ 1 - 1
src/video/SDL_video.c

@@ -5030,7 +5030,7 @@ int SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *messag
 
 SDL_bool SDL_ShouldAllowTopmost(void)
 {
-    return SDL_GetHintBoolean(SDL_HINT_ALLOW_TOPMOST, SDL_TRUE);
+    return SDL_GetHintBoolean(SDL_HINT_WINDOW_ALLOW_TOPMOST, SDL_TRUE);
 }
 
 int SDL_ShowWindowSystemMenu(SDL_Window *window, int x, int y)