diff --git a/es-app/src/views/gamelist/DetailedGameListView.cpp b/es-app/src/views/gamelist/DetailedGameListView.cpp index 0dbbbafbb5..12da1c4a5f 100644 --- a/es-app/src/views/gamelist/DetailedGameListView.cpp +++ b/es-app/src/views/gamelist/DetailedGameListView.cpp @@ -215,12 +215,19 @@ void DetailedGameListView::updateInfoPanel() FileData* file = (mList.size() == 0 || mList.isScrolling()) ? NULL : mList.getSelected(); bool fadingOut; - if(file == NULL) + if(mFile == file) + { + // Info is already on the panel, don't waste time reloading + return; + } + else if(file == NULL) { //mImage.setImage(""); //mDescription.setText(""); fadingOut = true; - }else{ + } + else + { mThumbnail.setImage(file->getThumbnailPath()); mMarquee.setImage(file->getMarqueePath()); mImage.setImage(file->getImagePath()); @@ -244,6 +251,8 @@ void DetailedGameListView::updateInfoPanel() fadingOut = false; } + mFile = file; + std::vector comps = getMDValues(); comps.push_back(&mThumbnail); comps.push_back(&mMarquee); diff --git a/es-app/src/views/gamelist/DetailedGameListView.h b/es-app/src/views/gamelist/DetailedGameListView.h index 6add975f4d..50352f6fcb 100644 --- a/es-app/src/views/gamelist/DetailedGameListView.h +++ b/es-app/src/views/gamelist/DetailedGameListView.h @@ -26,6 +26,8 @@ class DetailedGameListView : public BasicGameListView void initMDLabels(); void initMDValues(); + FileData* mFile; + ImageComponent mThumbnail; ImageComponent mMarquee; ImageComponent mImage; diff --git a/es-app/src/views/gamelist/VideoGameListView.cpp b/es-app/src/views/gamelist/VideoGameListView.cpp index 9b2e50a10c..b028938831 100644 --- a/es-app/src/views/gamelist/VideoGameListView.cpp +++ b/es-app/src/views/gamelist/VideoGameListView.cpp @@ -249,7 +249,12 @@ void VideoGameListView::updateInfoPanel() FileData* file = (mList.size() == 0 || mList.isScrolling()) ? NULL : mList.getSelected(); bool fadingOut; - if(file == NULL) + if(mFile == file) + { + // Info is already on the panel, don't waste time reloading + return; + } + else if(file == NULL) { mVideo->setVideo(""); mVideo->setImage(""); @@ -257,8 +262,9 @@ void VideoGameListView::updateInfoPanel() //mMarquee.setImage(""); //mDescription.setText(""); fadingOut = true; - - }else{ + } + else + { if (!mVideo->setVideo(file->getVideoPath())) { mVideo->setDefaultVideo(); @@ -290,6 +296,8 @@ void VideoGameListView::updateInfoPanel() fadingOut = false; } + mFile = file; + std::vector comps = getMDValues(); comps.push_back(&mThumbnail); comps.push_back(&mMarquee); diff --git a/es-app/src/views/gamelist/VideoGameListView.h b/es-app/src/views/gamelist/VideoGameListView.h index b5f36c6277..f0799b2396 100644 --- a/es-app/src/views/gamelist/VideoGameListView.h +++ b/es-app/src/views/gamelist/VideoGameListView.h @@ -33,6 +33,8 @@ class VideoGameListView : public BasicGameListView void initMDLabels(); void initMDValues(); + FileData* mFile; + ImageComponent mThumbnail; ImageComponent mMarquee; VideoComponent* mVideo; diff --git a/es-core/src/components/IList.h b/es-core/src/components/IList.h index 93f61ce9a8..2a60f94518 100644 --- a/es-core/src/components/IList.h +++ b/es-core/src/components/IList.h @@ -191,10 +191,6 @@ class IList : public GuiComponent { PowerSaver::setState(velocity == 0); - // generate an onCursorChanged event in the stopped state when the user lets go of the key - if(velocity == 0 && mScrollVelocity != 0) - onCursorChanged(CURSOR_STOPPED); - mScrollVelocity = velocity; mScrollTier = 0; mScrollTierAccumulator = 0; @@ -302,7 +298,7 @@ class IList : public GuiComponent onScroll(absAmt); mCursor = cursor; - onCursorChanged((mScrollTier > 0) ? CURSOR_SCROLLING : CURSOR_STOPPED); + onCursorChanged((amt != 0) ? CURSOR_SCROLLING : CURSOR_STOPPED); } virtual void onCursorChanged(const CursorState& /*state*/) {}