From 6189ba6d058119ca63e9ea71a2516d9dadf097c8 Mon Sep 17 00:00:00 2001 From: Pieter Hulshoff Date: Wed, 4 May 2016 10:33:02 +0200 Subject: [PATCH] Added autoFavorites switch in main settings.conf to automaticaly switch to the favorites playlist if it is available. --- Package/Environment/Common/settings.conf | 3 +++ RetroFE/Source/RetroFE.cpp | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Package/Environment/Common/settings.conf b/Package/Environment/Common/settings.conf index 38c073f..c001c15 100644 --- a/Package/Environment/Common/settings.conf +++ b/Package/Environment/Common/settings.conf @@ -22,6 +22,9 @@ showSquareBrackets = yes # specify the name of the first collection to load on start firstCollection = Main +# specify whether RetroFE should switch to Favorites list if it exists. +autoFavorites = true + ####################################### # Video playback settings ####################################### diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index 394d596..5b0e35e 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -529,6 +529,12 @@ RetroFE::RETROFE_STATE RetroFE::processUserInput(Page *page) page->setScrollOffsetIndex(lastMenuOffsets_[nextPageItem_->name]); } + bool autoFavorites = true; + config_.getProperty("autoFavorites", autoFavorites); + + if (autoFavorites) + page->nextPlaylist(); // Switch to favorites if it exists + state = RETROFE_NEXT_PAGE_REQUEST; } }