Fixed games count when there is no parent directory (fixes #807)

This commit is contained in:
Thomas Jentzsch 2021-08-25 17:34:44 +02:00
parent 91786be2d9
commit 0c22737e64
2 changed files with 10 additions and 9 deletions

View File

@ -422,8 +422,9 @@ void LauncherDialog::updateUI()
myDir->setText(myList->currentDir().getShortPath()); myDir->setText(myList->currentDir().getShortPath());
// Indicate how many files were found // Indicate how many files were found
bool hasParent = *myList->getList().begin() == " [..]";
ostringstream buf; ostringstream buf;
buf << (myList->getList().size() - 1) << (myShortCount ? " found" : " items found"); buf << (myList->getList().size() - (hasParent ? 1 : 0)) << (myShortCount ? " found" : " items found");
myRomCount->setLabel(buf.str()); myRomCount->setLabel(buf.str());
// Update ROM info UI item // Update ROM info UI item