diff --git a/es-app/src/views/GamelistBase.cpp b/es-app/src/views/GamelistBase.cpp index dfe0310a1..12a1ed831 100644 --- a/es-app/src/views/GamelistBase.cpp +++ b/es-app/src/views/GamelistBase.cpp @@ -447,8 +447,7 @@ bool GamelistBase::input(InputConfig* config, Input input) setCursor(getFirstEntry()); view->setCursor(view->getFirstEntry()); } - else if (selectLastEntry && mPrimary->size() > 0) { - setCursor(getLastEntry()); + else if (selectLastEntry && view->getPrimary()->size() > 0) { view->setCursor(view->getLastEntry()); } // Display the indication icons which show what games are part of the diff --git a/es-app/src/views/GamelistBase.h b/es-app/src/views/GamelistBase.h index 939be1861..5b285b049 100644 --- a/es-app/src/views/GamelistBase.h +++ b/es-app/src/views/GamelistBase.h @@ -65,6 +65,8 @@ public: protected: GamelistBase(FileData* root); + PrimaryComponent* getPrimary() { return mPrimary; } + // Called when a FileData* is added, has its metadata changed, or is removed. virtual void onFileChanged(FileData* file, bool reloadGamelist) = 0;