mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed an issue where cursor callbacks were not always executed in CarouselComponent.
Also added an immediate return from onDemandTextureLoad() in the carousel and grid components if there are no entries.
This commit is contained in:
parent
e96cbc52f9
commit
f99552a458
|
@ -474,6 +474,9 @@ void CarouselComponent<T>::updateEntry(Entry& entry, const std::shared_ptr<Theme
|
|||
template <typename T> void CarouselComponent<T>::onDemandTextureLoad()
|
||||
{
|
||||
if constexpr (std::is_same_v<T, FileData*>) {
|
||||
if (size() == 0)
|
||||
return;
|
||||
|
||||
if (mImageTypes.empty())
|
||||
mImageTypes.emplace_back("marquee");
|
||||
|
||||
|
@ -1981,7 +1984,7 @@ template <typename T> void CarouselComponent<T>::onCursorChanged(const CursorSta
|
|||
|
||||
GuiComponent::setAnimation(anim, 0, nullptr, false, 0);
|
||||
|
||||
if (mCursorChangedCallback && !mEntries.empty())
|
||||
if (mCursorChangedCallback)
|
||||
mCursorChangedCallback(state);
|
||||
}
|
||||
|
||||
|
|
|
@ -410,6 +410,9 @@ void GridComponent<T>::updateEntry(Entry& entry, const std::shared_ptr<ThemeData
|
|||
template <typename T> void GridComponent<T>::onDemandTextureLoad()
|
||||
{
|
||||
if constexpr (std::is_same_v<T, FileData*>) {
|
||||
if (size() == 0)
|
||||
return;
|
||||
|
||||
if (mImageTypes.empty())
|
||||
mImageTypes.emplace_back("marquee");
|
||||
|
||||
|
|
Loading…
Reference in a new issue