mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
System: don't consider games as registered if they were already in games.yml
Also, show message if nothing was added
This commit is contained in:
parent
d33955c290
commit
5fe36872c5
6 changed files with 87 additions and 31 deletions
|
|
@ -456,6 +456,7 @@ void main_window::show_boot_error(game_boot_result status)
|
|||
message = tr("A game or PS3 application is still running or has yet to be fully stopped.");
|
||||
break;
|
||||
case game_boot_result::firmware_missing: // Handled elsewhere
|
||||
case game_boot_result::already_added: // Handled elsewhere
|
||||
case game_boot_result::no_errors:
|
||||
return;
|
||||
case game_boot_result::generic_error:
|
||||
|
|
@ -3546,9 +3547,16 @@ void main_window::AddGamesFromDirs(QStringList&& paths)
|
|||
}
|
||||
}
|
||||
|
||||
u32 games_added = 0;
|
||||
|
||||
for (const QString& path : paths)
|
||||
{
|
||||
Emu.AddGamesFromDir(sstr(path));
|
||||
games_added += Emu.AddGamesFromDir(sstr(path));
|
||||
}
|
||||
|
||||
if (games_added)
|
||||
{
|
||||
gui_log.notice("AddGamesFromDirs added %d new entries", games_added);
|
||||
}
|
||||
|
||||
m_game_list_frame->AddRefreshedSlot([this, paths = std::move(paths), existing = std::move(existing)](std::set<std::string>& claimed_paths)
|
||||
|
|
@ -3580,7 +3588,11 @@ void main_window::AddGamesFromDirs(QStringList&& paths)
|
|||
}
|
||||
}
|
||||
|
||||
if (!paths_added.empty())
|
||||
if (paths_added.empty())
|
||||
{
|
||||
QMessageBox::information(this, tr("Nothing to add!"), tr("Could not find any new software."));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowOptionalGamePreparations(tr("Success!"), tr("Successfully added software to game list from path(s)!"), paths_added);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue