Commit 57118fb7dedcf527230329200baade4b14e99bf7

Cameron Cawley 2022-04-02T13:49:50

render: Fix setting the scale mode for non-native textures

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
 }