Skip to content

Commit

Permalink
Remove SDL_VERSION_ATLEAST #ifdefs not relevant for SDL3
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Oct 25, 2024
1 parent 5ffd6ba commit c30c406
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions include/SDL3_image/SDL_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_Load(const char *file);
*/
extern SDL_DECLSPEC SDL_Surface * SDLCALL IMG_Load_IO(SDL_IOStream *src, bool closeio);

#if SDL_VERSION_ATLEAST(2,0,0)

/**
* Load an image from a filesystem path into a GPU texture.
*
Expand Down Expand Up @@ -467,7 +465,6 @@ extern SDL_DECLSPEC SDL_Texture * SDLCALL IMG_LoadTexture_IO(SDL_Renderer *rende
* \sa SDL_DestroyTexture
*/
extern SDL_DECLSPEC SDL_Texture * SDLCALL IMG_LoadTextureTyped_IO(SDL_Renderer *renderer, SDL_IOStream *src, bool closeio, const char *type);
#endif /* SDL 2.0 */

/**
* Detect AVIF image data on a readable/seekable SDL_IOStream.
Expand Down
2 changes: 0 additions & 2 deletions src/IMG.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ SDL_Surface *IMG_LoadTyped_IO(SDL_IOStream *src, bool closeio, const char *type)
return NULL;
}

#if SDL_VERSION_ATLEAST(2,0,0)
SDL_Texture *IMG_LoadTexture(SDL_Renderer *renderer, const char *file)
{
SDL_Texture *texture = NULL;
Expand Down Expand Up @@ -297,7 +296,6 @@ SDL_Texture *IMG_LoadTextureTyped_IO(SDL_Renderer *renderer, SDL_IOStream *src,
}
return texture;
}
#endif /* SDL 2.0 */

/* Load an animation from a file */
IMG_Animation *IMG_LoadAnimation(const char *file)
Expand Down
8 changes: 0 additions & 8 deletions src/IMG_svg.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@

#ifdef LOAD_SVG

#if !SDL_VERSION_ATLEAST(2, 0, 16)
/* SDL_roundf() is available starting with 2.0.16 */
static float SDLCALL SDL_roundf(float x)
{
return (x >= 0.0f) ? SDL_floorf(x + 0.5f) : SDL_ceilf(x - 0.5f);
}
#endif /* SDL 2.0.16 */

/* Replace C runtime functions with SDL C runtime functions for building on Windows */
#define free SDL_free
#define malloc SDL_malloc
Expand Down

0 comments on commit c30c406

Please sign in to comment.