aboutsummaryrefslogtreecommitdiff
path: root/src/scale.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scale.c')
-rw-r--r--src/scale.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/scale.c b/src/scale.c
index da35e63..f435395 100644
--- a/src/scale.c
+++ b/src/scale.c
@@ -1,16 +1,10 @@
#include "scale.h"
-#include "SDL3/SDL_error.h"
-#include "SDL3/SDL_render.h"
-#include "SDL3/SDL_stdinc.h"
static SDL_ScaleMode scale_pixel_perfect(float twf, float thf, int rw, int rh,
SDL_FRect *target) {
int tw = (int)twf;
int th = (int)thf;
int scale = SDL_min(rw / tw, rh / th);
- if (!scale) {
- return SDL_SCALEMODE_INVALID;
- }
int w = scale * tw;
int h = scale * th;
@@ -100,7 +94,7 @@ bool pw_scale(enum pw_scale_mode mode, SDL_Texture *texture,
SDL_FRect t;
SDL_ScaleMode m = scalefn(twf, thf, rw, rh, &t);
- if (m == SDL_SCALEMODE_INVALID || !SDL_SetTextureScaleMode(texture, m)) {
+ if (!SDL_SetTextureScaleMode(texture, m)) {
return false;
}