Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for <fanartres> not being used in advancedsettings.xml #17824

Merged
merged 1 commit into from May 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions xbmc/pictures/Picture.cpp
Expand Up @@ -214,12 +214,13 @@ bool CPicture::CacheTexture(uint8_t *pixels, uint32_t width, uint32_t height, ui
uint32_t max_height = advancedSettings->m_imageRes;
if (advancedSettings->m_fanartRes > advancedSettings->m_imageRes)
{ // 16x9 images larger than the fanart res use that rather than the image res
if (fabsf(static_cast<float>(width) / static_cast<float>(height) / (16.0f / 9.0f) - 1.0f) <= 0.01f &&
height >= advancedSettings->m_fanartRes)
if (fabsf(static_cast<float>(width) / static_cast<float>(height) / (16.0f / 9.0f) - 1.0f)
<= 0.01f)
phunkyfish marked this conversation as resolved.
Show resolved Hide resolved
{
max_height = advancedSettings->m_fanartRes;
max_height = advancedSettings->m_fanartRes; // use height defined in fanartRes
}
}

uint32_t max_width = max_height * 16/9;

dest_height = std::min(dest_height, max_height);
Expand Down