mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Only run input code when input is pressed, not released.
This commit is contained in:
parent
ed64c22dcb
commit
bec3a2599a
|
@ -43,39 +43,42 @@ void GridGameListView::setCursor(FileData* file)
|
||||||
|
|
||||||
bool GridGameListView::input(InputConfig* config, Input input)
|
bool GridGameListView::input(InputConfig* config, Input input)
|
||||||
{
|
{
|
||||||
if(config->isMappedTo("a", input))
|
if(input.value != 0)
|
||||||
{
|
{
|
||||||
if(mGrid.getList().size() > 0)
|
if(config->isMappedTo("a", input))
|
||||||
{
|
{
|
||||||
FileData* cursor = getCursor();
|
if(mGrid.getList().size() > 0)
|
||||||
if(cursor->getType() == GAME)
|
|
||||||
{
|
{
|
||||||
mWindow->getViewController()->launch(cursor);
|
FileData* cursor = getCursor();
|
||||||
}else{
|
if(cursor->getType() == GAME)
|
||||||
// it's a folder
|
|
||||||
if(cursor->getChildren().size() > 0)
|
|
||||||
{
|
{
|
||||||
mCursorStack.push(cursor);
|
mWindow->getViewController()->launch(cursor);
|
||||||
populateList(cursor);
|
}else{
|
||||||
|
// it's a folder
|
||||||
|
if(cursor->getChildren().size() > 0)
|
||||||
|
{
|
||||||
|
mCursorStack.push(cursor);
|
||||||
|
populateList(cursor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}else if(config->isMappedTo("b", input))
|
||||||
|
{
|
||||||
|
if(mCursorStack.size())
|
||||||
|
{
|
||||||
|
populateList(mCursorStack.top()->getParent());
|
||||||
|
mGrid.setCursor(mCursorStack.top());
|
||||||
|
mCursorStack.pop();
|
||||||
|
mTheme->playSound("backSound");
|
||||||
|
}else{
|
||||||
|
mGrid.stopScrolling();
|
||||||
|
mWindow->getViewController()->goToSystemSelect();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}else if(config->isMappedTo("b", input))
|
|
||||||
{
|
|
||||||
if(mCursorStack.size())
|
|
||||||
{
|
|
||||||
populateList(mCursorStack.top()->getParent());
|
|
||||||
mGrid.setCursor(mCursorStack.top());
|
|
||||||
mCursorStack.pop();
|
|
||||||
mTheme->playSound("backSound");
|
|
||||||
}else{
|
|
||||||
mGrid.stopScrolling();
|
|
||||||
mWindow->getViewController()->goToSystemSelect();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return GameListView::input(config, input);
|
return GameListView::input(config, input);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue