Move some of the align pow2 functions that are only used for one file to

their respective proper locations
This commit is contained in:
libretroadmin 2022-07-22 21:20:00 +02:00
commit 3e5b4abaa1
3 changed files with 20 additions and 20 deletions

View file

@ -191,6 +191,16 @@ void GPU_HW::UpdateHWSettings(bool* framebuffer_changed, bool* shaders_changed)
UpdateSoftwareRenderer(true);
}
static u32 PreviousPow2(u32 value)
{
value |= (value >> 1);
value |= (value >> 2);
value |= (value >> 4);
value |= (value >> 8);
value |= (value >> 16);
return value - (value >> 1);
}
u32 GPU_HW::CalculateResolutionScale() const
{
u32 scale;
@ -210,7 +220,7 @@ u32 GPU_HW::CalculateResolutionScale() const
}
if (g_settings.gpu_downsample_mode == GPUDownsampleMode::Adaptive && m_supports_adaptive_downsampling && scale > 1 &&
!(IS_POW2(scale)))
return Common::PreviousPow2(scale);
return PreviousPow2(scale);
return scale;
}