From dfcf267ebafdcb6435dd70a8399237ef372764c5 Mon Sep 17 00:00:00 2001 From: Pieter Hulshoff Date: Mon, 27 Apr 2020 17:37:46 +0200 Subject: [PATCH] Added backOnEmpty option to automatically exit an empty collection. --- RetroFE/Source/RetroFE.cpp | 12 +++++++++++- RetroFE/Source/Version.cpp | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index 96f7365..928eb2a 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -387,7 +387,6 @@ bool RetroFE::run( ) // Not in splash mode if ( currentPage_ && !splashMode ) { - // account for when returning from a menu and the previous key was still "stuck" if ( lastLaunchReturnTime_ == 0 || (currentTime_ - lastLaunchReturnTime_ > .3) ) { @@ -414,6 +413,7 @@ bool RetroFE::run( ) state = RETROFE_SPLASH_EXIT; } + break; // Load art on entering RetroFE @@ -653,6 +653,16 @@ bool RetroFE::run( ) state = RETROFE_NEXT_PAGE_MENU_LOAD_ART; + // Check if we've entered an empty collection and need to go back automatically + if (currentPage_->getCollectionSize() == 0) + { + bool backOnEmpty = false; + config_.getProperty( "backOnEmpty", backOnEmpty ); + if (backOnEmpty) + state = RETROFE_BACK_MENU_EXIT; + } + + } break; diff --git a/RetroFE/Source/Version.cpp b/RetroFE/Source/Version.cpp index cff9c22..8fd18d9 100644 --- a/RetroFE/Source/Version.cpp +++ b/RetroFE/Source/Version.cpp @@ -21,7 +21,7 @@ std::string retrofe_version_major = "0"; std::string retrofe_version_minor = "9"; -std::string retrofe_version_build = "38"; +std::string retrofe_version_build = "39"; std::string Version::getString( )