mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-12-01 18:45:39 +00:00
Allow maxLogoCount to be set to 0 for legacy themes.
This commit is contained in:
parent
0dfdf1c20c
commit
85ce3ef7f6
|
@ -915,9 +915,10 @@ void CarouselComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elem->has("maxLogoCount")) {
|
if (elem->has("maxLogoCount")) {
|
||||||
|
// For legacy themes we allow a maxLogoCount (maxItemCount) of 0.
|
||||||
if (theme->isLegacyTheme())
|
if (theme->isLegacyTheme())
|
||||||
mMaxItemCount =
|
mMaxItemCount =
|
||||||
std::ceil(glm::clamp(elem->get<float>("maxLogoCount"), 0.5f, 30.0f));
|
std::ceil(glm::clamp(elem->get<float>("maxLogoCount"), 0.0f, 30.0f));
|
||||||
else
|
else
|
||||||
mMaxItemCount = glm::clamp(elem->get<float>("maxLogoCount"), 0.5f, 30.0f);
|
mMaxItemCount = glm::clamp(elem->get<float>("maxLogoCount"), 0.5f, 30.0f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue