diff options
Diffstat (limited to 'src/scale.c')
| -rw-r--r-- | src/scale.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/scale.c b/src/scale.c index 637db86..bf6addb 100644 --- a/src/scale.c +++ b/src/scale.c @@ -1,3 +1,5 @@ +#include <SDL3/SDL_version.h> + #include "scale.h" static bool is_safei(int i) { @@ -43,7 +45,11 @@ static SDL_ScaleMode scale_fill(float twf, float thf, int rw, int rh, target->x = x; target->y = y; +#if SDL_VERSION_ATLEAST(3, 4, 0) return SDL_SCALEMODE_PIXELART; +#else + return SDL_SCALEMODE_NEAREST; +#endif } static SDL_ScaleMode scale_stretch(float twf, float thf, int rw, int rh, @@ -56,7 +62,11 @@ static SDL_ScaleMode scale_stretch(float twf, float thf, int rw, int rh, target->x = 0.; target->y = 0.; +#if SDL_VERSION_ATLEAST(3, 4, 0) return SDL_SCALEMODE_PIXELART; +#else + return SDL_SCALEMODE_NEAREST; +#endif } bool pw_scale(enum pw_scale_mode mode, SDL_Texture *texture, |
