mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-06-06 10:56:48 +02:00
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:
@@ -495,9 +495,18 @@ void RetroFE::run()
|
|||||||
case RETROFE_NEXT_PAGE_MENU_ENTER:
|
case RETROFE_NEXT_PAGE_MENU_ENTER:
|
||||||
if(currentPage_->isIdle())
|
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:
|
case RETROFE_LAUNCH_REQUEST:
|
||||||
nextPageItem_ = currentPage_->getSelectedItem();
|
nextPageItem_ = currentPage_->getSelectedItem();
|
||||||
@@ -572,6 +581,15 @@ void RetroFE::run()
|
|||||||
if(currentPage_->isIdle())
|
if(currentPage_->isIdle())
|
||||||
{
|
{
|
||||||
currentPage_->cleanup();
|
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;
|
state = RETROFE_IDLE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user