Refresh game list after installing RAP files via menus

This commit is contained in:
NicknineTheEagle 2021-07-18 22:51:08 +03:00 committed by Megamouse
parent 4fcc1c0f31
commit b30ac48513

View File

@ -625,6 +625,8 @@ void main_window::InstallPackages(QStringList file_paths)
}
// Install rap files if available
int installed_rap_count = 0;
for (const auto& rap : file_paths.filter(QRegExp(".*\\.rap", Qt::CaseInsensitive)))
{
const QFileInfo file_info(rap);
@ -633,6 +635,7 @@ void main_window::InstallPackages(QStringList file_paths)
if (InstallRapFile(rap, rapname))
{
gui_log.success("Successfully copied rap file: %s", rapname);
installed_rap_count++;
}
else
{
@ -640,6 +643,12 @@ void main_window::InstallPackages(QStringList file_paths)
}
}
if (installed_rap_count > 0)
{
// Refresh game list since we probably unlocked some games now.
m_game_list_frame->Refresh(true);
}
// Find remaining package files
file_paths = file_paths.filter(QRegExp(".*\\.pkg", Qt::CaseInsensitive));