mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-28 09:38:52 +01:00
Prevent resetting of attract mode when switching playlist through attract mode. Added attractModeSkipPlaylist option to settings.conf.
This commit is contained in:
parent
8876c0989e
commit
2f5bfed9e9
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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( )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user