mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +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")) {
|
||||
// For legacy themes we allow a maxLogoCount (maxItemCount) of 0.
|
||||
if (theme->isLegacyTheme())
|
||||
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
|
||||
mMaxItemCount = glm::clamp(elem->get<float>("maxLogoCount"), 0.5f, 30.0f);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue