Prevent resetting of attract mode when switching playlist through attract mode. Added attractModeSkipPlaylist option to settings.conf.

This commit is contained in:
Pieter Hulshoff 2019-04-16 22:48:31 +02:00
parent 8876c0989e
commit 2f5bfed9e9
4 changed files with 10 additions and 6 deletions

View File

@ -29,13 +29,13 @@ AttractMode::AttractMode()
{
}
void AttractMode::reset( bool set )
void AttractMode::reset( bool set, bool resetElapsedPlaylistTime )
{
elapsedTime_ = 0;
isActive_ = false;
isSet_ = set;
activeTime_ = 0;
if (!set)
if (resetElapsedPlaylistTime)
elapsedPlaylistTime_ = 0;
}

View File

@ -21,7 +21,7 @@ class AttractMode
{
public:
AttractMode();
void reset( bool set = false );
void reset( bool set = false, bool resetElapsedPlaylistTime = true );
bool update(float dt, Page &page);
float idleTime;
float idleNextTime;

View File

@ -893,8 +893,12 @@ void RetroFE::run( )
{
if (attract_.update( deltaTime, *currentPage_ ))
{
attract_.reset( );
attract_.reset( attract_.isSet( ), true );
currentPage_->nextPlaylist( );
std::string attractModeSkipPlaylist = "";
config_.getProperty( "attractModeSkipPlaylist", attractModeSkipPlaylist );
if (currentPage_->getPlaylistName( ) == attractModeSkipPlaylist)
currentPage_->nextPlaylist( );
state = RETROFE_PLAYLIST_REQUEST;
}
}
@ -1149,7 +1153,7 @@ RetroFE::RETROFE_STATE RetroFE::processUserInput( Page *page )
page->resetScrollPeriod( );
if (page->isMenuScrolling( ))
{
attract_.reset( attract_.isSet( ) );
attract_.reset( attract_.isSet( ), false );
state = RETROFE_HIGHLIGHT_REQUEST;
}
}

View File

@ -21,7 +21,7 @@
std::string retrofe_version_major = "0";
std::string retrofe_version_minor = "8";
std::string retrofe_version_build = "28";
std::string retrofe_version_build = "29";
std::string Version::getString( )