From c30c4067658d2926576fbd3dd54df3c74b941099 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 25 Oct 2024 22:08:02 +0200
Subject: [PATCH] Remove SDL_VERSION_ATLEAST #ifdefs not relevant for SDL3
---
include/SDL3_image/SDL_image.h | 3 ---
src/IMG.c | 2 --
src/IMG_svg.c | 8 --------
3 files changed, 13 deletions(-)
diff --git a/include/SDL3_image/SDL_image.h b/include/SDL3_image/SDL_image.h
index 606fe573..8cbd5af3 100644
--- a/include/SDL3_image/SDL_image.h
+++ b/include/SDL3_image/SDL_image.h
@@ -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.
*
@@ -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.
diff --git a/src/IMG.c b/src/IMG.c
index 28bd83b1..b32adc33 100644
--- a/src/IMG.c
+++ b/src/IMG.c
@@ -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;
@@ -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)
diff --git a/src/IMG_svg.c b/src/IMG_svg.c
index 9ba4ddef..a042f2cb 100644
--- a/src/IMG_svg.c
+++ b/src/IMG_svg.c
@@ -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