Added SDL_AddSurfaceAlternateImage(), SDL_SurfaceHasAlternateImages(), SDL_GetSurfaceImages() and SDL_RemoveSurfaceAlternateImages()

These functions allow you to create surfaces with alternate high DPI content, and will be used for high DPI icon and cursor support.
This commit is contained in:
Sam Lantinga
2024-07-31 21:39:37 -07:00
parent b8dc97c577
commit 94d9229ce2
6 changed files with 222 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ SDL3_0.0.0 {
SDL_AddGamepadMappingsFromFile;
SDL_AddGamepadMappingsFromIO;
SDL_AddHintCallback;
SDL_AddSurfaceAlternateImage;
SDL_AddTimer;
SDL_AddTimerNS;
SDL_AddVulkanRenderSemaphores;
@@ -438,6 +439,7 @@ SDL3_0.0.0 {
SDL_GetSurfaceColorKey;
SDL_GetSurfaceColorMod;
SDL_GetSurfaceColorspace;
SDL_GetSurfaceImages;
SDL_GetSurfacePalette;
SDL_GetSurfaceProperties;
SDL_GetSystemRAM;
@@ -644,6 +646,7 @@ SDL3_0.0.0 {
SDL_ReloadGamepadMappings;
SDL_RemovePath;
SDL_RemoveStoragePath;
SDL_RemoveSurfaceAlternateImages;
SDL_RemoveTimer;
SDL_RenamePath;
SDL_RenameStoragePath;
@@ -820,6 +823,7 @@ SDL3_0.0.0 {
SDL_StopTextInput;
SDL_StorageReady;
SDL_StringToGUID;
SDL_SurfaceHasAlternateImages;
SDL_SurfaceHasColorKey;
SDL_SurfaceHasRLE;
SDL_SyncWindow;

View File

@@ -33,6 +33,7 @@
#define SDL_AddGamepadMappingsFromFile SDL_AddGamepadMappingsFromFile_REAL
#define SDL_AddGamepadMappingsFromIO SDL_AddGamepadMappingsFromIO_REAL
#define SDL_AddHintCallback SDL_AddHintCallback_REAL
#define SDL_AddSurfaceAlternateImage SDL_AddSurfaceAlternateImage_REAL
#define SDL_AddTimer SDL_AddTimer_REAL
#define SDL_AddTimerNS SDL_AddTimerNS_REAL
#define SDL_AddVulkanRenderSemaphores SDL_AddVulkanRenderSemaphores_REAL
@@ -463,6 +464,7 @@
#define SDL_GetSurfaceColorKey SDL_GetSurfaceColorKey_REAL
#define SDL_GetSurfaceColorMod SDL_GetSurfaceColorMod_REAL
#define SDL_GetSurfaceColorspace SDL_GetSurfaceColorspace_REAL
#define SDL_GetSurfaceImages SDL_GetSurfaceImages_REAL
#define SDL_GetSurfacePalette SDL_GetSurfacePalette_REAL
#define SDL_GetSurfaceProperties SDL_GetSurfaceProperties_REAL
#define SDL_GetSystemRAM SDL_GetSystemRAM_REAL
@@ -669,6 +671,7 @@
#define SDL_ReloadGamepadMappings SDL_ReloadGamepadMappings_REAL
#define SDL_RemovePath SDL_RemovePath_REAL
#define SDL_RemoveStoragePath SDL_RemoveStoragePath_REAL
#define SDL_RemoveSurfaceAlternateImages SDL_RemoveSurfaceAlternateImages_REAL
#define SDL_RemoveTimer SDL_RemoveTimer_REAL
#define SDL_RenamePath SDL_RenamePath_REAL
#define SDL_RenameStoragePath SDL_RenameStoragePath_REAL
@@ -845,6 +848,7 @@
#define SDL_StopTextInput SDL_StopTextInput_REAL
#define SDL_StorageReady SDL_StorageReady_REAL
#define SDL_StringToGUID SDL_StringToGUID_REAL
#define SDL_SurfaceHasAlternateImages SDL_SurfaceHasAlternateImages_REAL
#define SDL_SurfaceHasColorKey SDL_SurfaceHasColorKey_REAL
#define SDL_SurfaceHasRLE SDL_SurfaceHasRLE_REAL
#define SDL_SyncWindow SDL_SyncWindow_REAL

View File

@@ -53,6 +53,7 @@ SDL_DYNAPI_PROC(int,SDL_AddGamepadMapping,(const char *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_AddGamepadMappingsFromFile,(const char *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_AddGamepadMappingsFromIO,(SDL_IOStream *a, SDL_bool b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_AddHintCallback,(const char *a, SDL_HintCallback b, void *c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_AddSurfaceAlternateImage,(SDL_Surface *a, SDL_Surface *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_TimerID,SDL_AddTimer,(Uint32 a, SDL_TimerCallback b, void *c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_TimerID,SDL_AddTimerNS,(Uint64 a, SDL_NSTimerCallback b, void *c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_AddVulkanRenderSemaphores,(SDL_Renderer *a, Uint32 b, Sint64 c, Sint64 d),(a,b,c,d),return)
@@ -483,6 +484,7 @@ SDL_DYNAPI_PROC(int,SDL_GetSurfaceClipRect,(SDL_Surface *a, SDL_Rect *b),(a,b),r
SDL_DYNAPI_PROC(int,SDL_GetSurfaceColorKey,(SDL_Surface *a, Uint32 *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_GetSurfaceColorMod,(SDL_Surface *a, Uint8 *b, Uint8 *c, Uint8 *d),(a,b,c,d),return)
SDL_DYNAPI_PROC(SDL_Colorspace,SDL_GetSurfaceColorspace,(SDL_Surface *a),(a),return)
SDL_DYNAPI_PROC(SDL_Surface**,SDL_GetSurfaceImages,(SDL_Surface *a, int *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_Palette*,SDL_GetSurfacePalette,(SDL_Surface *a),(a),return)
SDL_DYNAPI_PROC(SDL_PropertiesID,SDL_GetSurfaceProperties,(SDL_Surface *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_GetSystemRAM,(void),(),return)
@@ -680,6 +682,7 @@ SDL_DYNAPI_PROC(int,SDL_ReleaseCameraFrame,(SDL_Camera *a, SDL_Surface *b),(a,b)
SDL_DYNAPI_PROC(int,SDL_ReloadGamepadMappings,(void),(),return)
SDL_DYNAPI_PROC(int,SDL_RemovePath,(const char *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_RemoveStoragePath,(SDL_Storage *a, const char *b),(a,b),return)
SDL_DYNAPI_PROC(void,SDL_RemoveSurfaceAlternateImages,(SDL_Surface *a),(a),)
SDL_DYNAPI_PROC(int,SDL_RemoveTimer,(SDL_TimerID a),(a),return)
SDL_DYNAPI_PROC(int,SDL_RenamePath,(const char *a, const char *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_RenameStoragePath,(SDL_Storage *a, const char *b, const char *c),(a,b,c),return)
@@ -855,6 +858,7 @@ SDL_DYNAPI_PROC(int,SDL_StopHapticRumble,(SDL_Haptic *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_StopTextInput,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_StorageReady,(SDL_Storage *a),(a),return)
SDL_DYNAPI_PROC(SDL_GUID,SDL_StringToGUID,(const char *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_SurfaceHasAlternateImages,(SDL_Surface *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_SurfaceHasColorKey,(SDL_Surface *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_SurfaceHasRLE,(SDL_Surface *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_SyncWindow,(SDL_Window *a),(a),return)