Added collectionInputClear parameter to the global settings.conf. If set to

true, the input queue will be cleared on entering/exiting a collection.
This commit is contained in:
Pieter Hulshoff 2017-01-11 11:05:06 +01:00
parent 5956eec040
commit 2deaa7f542

View File

@ -495,9 +495,18 @@ void RetroFE::run()
case RETROFE_NEXT_PAGE_MENU_ENTER:
if(currentPage_->isIdle())
{
state = RETROFE_IDLE;
bool collectionInputClear = false;
config_.getProperty( "collectionInputClear", collectionInputClear );
if( collectionInputClear )
{
// Empty event queue
SDL_Event e;
while (SDL_PollEvent(&e));
input_.resetStates();
}
state = RETROFE_IDLE;
}
break;
break;
case RETROFE_LAUNCH_REQUEST:
nextPageItem_ = currentPage_->getSelectedItem();
@ -572,6 +581,15 @@ void RetroFE::run()
if(currentPage_->isIdle())
{
currentPage_->cleanup();
bool collectionInputClear = false;
config_.getProperty( "collectionInputClear", collectionInputClear );
if( collectionInputClear )
{
// Empty event queue
SDL_Event e;
while (SDL_PollEvent(&e));
input_.resetStates();
}
state = RETROFE_IDLE;
}
break;