Added backOnEmpty option to automatically exit an empty collection.

This commit is contained in:
Pieter Hulshoff 2020-04-27 17:37:46 +02:00
parent 992a855672
commit dfcf267eba
2 changed files with 12 additions and 2 deletions

View File

@ -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;

View File

@ -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( )