Do not scale texture unless necessary.

This avoids scaling textures to 'texture_min_size' unless it is actually
required (because either auto-scaling or bi/trilinear filtering is enabled)
This commit is contained in:
Lars Hofhansl 2017-11-04 18:05:47 -07:00 committed by SmallJoker
parent 6808a3d144
commit 0cfe3a810a
1 changed files with 2 additions and 1 deletions

View File

@ -1805,7 +1805,8 @@ bool TextureSource::generateImagePart(std::string part_of_name,
* mix high- and low-res textures, or for mods with least-common-denominator
* textures that don't have the resources to offer high-res alternatives.
*/
s32 scaleto = g_settings->getS32("texture_min_size");
const bool filter = m_setting_trilinear_filter || m_setting_bilinear_filter;
const s32 scaleto = filter ? g_settings->getS32("texture_min_size") : 1;
if (scaleto > 1) {
const core::dimension2d<u32> dim = baseimg->getDimension();