mirror of https://github.com/encounter/SDL.git
render: Fix setting the scale mode for non-native textures
This commit is contained in:
parent
312c899f4f
commit
57118fb7de
|
@ -1592,10 +1592,11 @@ SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode)
|
||||||
CHECK_TEXTURE_MAGIC(texture, -1);
|
CHECK_TEXTURE_MAGIC(texture, -1);
|
||||||
|
|
||||||
renderer = texture->renderer;
|
renderer = texture->renderer;
|
||||||
renderer->SetTextureScaleMode(renderer, texture, scaleMode);
|
|
||||||
texture->scaleMode = scaleMode;
|
texture->scaleMode = scaleMode;
|
||||||
if (texture->native) {
|
if (texture->native) {
|
||||||
return SDL_SetTextureScaleMode(texture->native, scaleMode);
|
return SDL_SetTextureScaleMode(texture->native, scaleMode);
|
||||||
|
} else {
|
||||||
|
renderer->SetTextureScaleMode(renderer, texture, scaleMode);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue