Apply bilinear option for SDL texture

Set the texture option for bilinear or nearest on the SDL texture
depending on the value of the bilinear checkbox.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover
2025-09-17 21:13:48 +00:00
parent 9fcc0ad7a8
commit 6ec0ba0610

View File

@@ -2574,6 +2574,13 @@ SDL_TEXTUREACCESS_STREAMING, (width * scale), (height * scale));
}
#endif
}
// Set bilinear or nearest on the texture.
#ifdef ENABLE_SDL3
SDL_SetTextureScaleMode(texture, OPTION(kDispBilinear) ? SDL_SCALEMODE_LINEAR : SDL_SCALEMODE_NEAREST);
#else
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, OPTION(kDispBilinear) ? "1" : "0");
#endif
did_init = true;
}