render: Fix setting the scale mode for non-native textures
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 554f8a4..471e8c0 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1592,10 +1592,11 @@ SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode)
CHECK_TEXTURE_MAGIC(texture, -1);
renderer = texture->renderer;
- renderer->SetTextureScaleMode(renderer, texture, scaleMode);
texture->scaleMode = scaleMode;
if (texture->native) {
return SDL_SetTextureScaleMode(texture->native, scaleMode);
+ } else {
+ renderer->SetTextureScaleMode(renderer, texture, scaleMode);
}
return 0;
}