diff --git a/build-scripts/SDL_migration.cocci b/build-scripts/SDL_migration.cocci index 9b732532f..bf036c1cd 100644 --- a/build-scripts/SDL_migration.cocci +++ b/build-scripts/SDL_migration.cocci @@ -2904,3 +2904,8 @@ expression e1, e2, e3, e4; - SDL_threadID + SDL_ThreadID (...) +@@ +@@ +- SDL_HasWindowSurface ++ SDL_WindowHasSurface + (...) diff --git a/docs/README-migration.md b/docs/README-migration.md index da7a7bda8..ffe3e761d 100644 --- a/docs/README-migration.md +++ b/docs/README-migration.md @@ -1626,6 +1626,7 @@ The following functions have been renamed: * SDL_GetRectDisplayIndex() => SDL_GetDisplayForRect() * SDL_GetWindowDisplayIndex() => SDL_GetDisplayForWindow() * SDL_GetWindowDisplayMode() => SDL_GetWindowFullscreenMode() +* SDL_HasWindowSurface() => SDL_WindowHasSurface() * SDL_IsScreenSaverEnabled() => SDL_ScreenSaverEnabled() * SDL_SetWindowDisplayMode() => SDL_SetWindowFullscreenMode() diff --git a/include/SDL3/SDL_oldnames.h b/include/SDL3/SDL_oldnames.h index 0a7a47cae..a5aaf1148 100644 --- a/include/SDL3/SDL_oldnames.h +++ b/include/SDL3/SDL_oldnames.h @@ -499,6 +499,7 @@ #define SDL_GetRectDisplayIndex SDL_GetDisplayForRect #define SDL_GetWindowDisplayIndex SDL_GetDisplayForWindow #define SDL_GetWindowDisplayMode SDL_GetWindowFullscreenMode +#define SDL_HasWindowSurface SDL_WindowHasSurface #define SDL_IsScreenSaverEnabled SDL_ScreenSaverEnabled #define SDL_SetWindowDisplayMode SDL_SetWindowFullscreenMode #define SDL_WINDOW_ALLOW_HIGHDPI SDL_WINDOW_HIGH_PIXEL_DENSITY @@ -967,6 +968,7 @@ #define SDL_GetRectDisplayIndex SDL_GetRectDisplayIndex_renamed_SDL_GetDisplayForRect #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_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 diff --git a/include/SDL3/SDL_video.h b/include/SDL3/SDL_video.h index bd290fc96..57cf51d47 100644 --- a/include/SDL3/SDL_video.h +++ b/include/SDL3/SDL_video.h @@ -1699,7 +1699,7 @@ extern DECLSPEC int SDLCALL SDL_SyncWindow(SDL_Window *window); * * \sa SDL_GetWindowSurface */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasWindowSurface(SDL_Window *window); +extern DECLSPEC SDL_bool SDLCALL SDL_WindowHasSurface(SDL_Window *window); /** * Get the SDL surface associated with the window. @@ -1722,7 +1722,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasWindowSurface(SDL_Window *window); * \since This function is available since SDL 3.0.0. * * \sa SDL_DestroyWindowSurface - * \sa SDL_HasWindowSurface + * \sa SDL_WindowHasSurface * \sa SDL_UpdateWindowSurface * \sa SDL_UpdateWindowSurfaceRects */ @@ -1784,7 +1784,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window, con * \since This function is available since SDL 3.0.0. * * \sa SDL_GetWindowSurface - * \sa SDL_HasWindowSurface + * \sa SDL_WindowHasSurface */ extern DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window); diff --git a/src/dynapi/SDL_dynapi.sym b/src/dynapi/SDL_dynapi.sym index b4dca5f46..2ba1f7be6 100644 --- a/src/dynapi/SDL_dynapi.sym +++ b/src/dynapi/SDL_dynapi.sym @@ -393,7 +393,7 @@ SDL3_0.0.0 { SDL_HasSSE42; SDL_HasSSE; SDL_HasScreenKeyboardSupport; - SDL_HasWindowSurface; + SDL_WindowHasSurface; SDL_HideCursor; SDL_HideWindow; SDL_Init; diff --git a/src/dynapi/SDL_dynapi_overrides.h b/src/dynapi/SDL_dynapi_overrides.h index 341add8cd..b297a3026 100644 --- a/src/dynapi/SDL_dynapi_overrides.h +++ b/src/dynapi/SDL_dynapi_overrides.h @@ -417,7 +417,7 @@ #define SDL_HasSSE41 SDL_HasSSE41_REAL #define SDL_HasSSE42 SDL_HasSSE42_REAL #define SDL_HasScreenKeyboardSupport SDL_HasScreenKeyboardSupport_REAL -#define SDL_HasWindowSurface SDL_HasWindowSurface_REAL +#define SDL_WindowHasSurface SDL_WindowHasSurface_REAL #define SDL_HideCursor SDL_HideCursor_REAL #define SDL_HideWindow SDL_HideWindow_REAL #define SDL_Init SDL_Init_REAL diff --git a/src/dynapi/SDL_dynapi_procs.h b/src/dynapi/SDL_dynapi_procs.h index a276a7e97..e8a4e188d 100644 --- a/src/dynapi/SDL_dynapi_procs.h +++ b/src/dynapi/SDL_dynapi_procs.h @@ -476,7 +476,7 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE3,(void),(),return) SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE41,(void),(),return) SDL_DYNAPI_PROC(SDL_bool,SDL_HasSSE42,(void),(),return) SDL_DYNAPI_PROC(SDL_bool,SDL_HasScreenKeyboardSupport,(void),(),return) -SDL_DYNAPI_PROC(SDL_bool,SDL_HasWindowSurface,(SDL_Window *a),(a),return) +SDL_DYNAPI_PROC(SDL_bool,SDL_WindowHasSurface,(SDL_Window *a),(a),return) SDL_DYNAPI_PROC(int,SDL_HideCursor,(void),(),return) SDL_DYNAPI_PROC(int,SDL_HideWindow,(SDL_Window *a),(a),return) SDL_DYNAPI_PROC(int,SDL_Init,(Uint32 a),(a),return) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index d10e1e3c3..173a32373 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -899,7 +899,7 @@ SDL_Renderer *SDL_CreateRendererWithProperties(SDL_PropertiesID props) goto error; } - if (SDL_HasWindowSurface(window)) { + if (SDL_WindowHasSurface(window)) { SDL_SetError("Surface already associated with window"); goto error; } diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index cbc6b29e1..f568e3cf4 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -3119,7 +3119,7 @@ static SDL_Surface *SDL_CreateWindowFramebuffer(SDL_Window *window) return SDL_CreateSurfaceFrom(pixels, w, h, pitch, format); } -SDL_bool SDL_HasWindowSurface(SDL_Window *window) +SDL_bool SDL_WindowHasSurface(SDL_Window *window) { CHECK_WINDOW_MAGIC(window, SDL_FALSE);