optimization: Avoid enumerating applications multiple times

This commit is contained in:
TSR Berry 2024-07-28 21:05:10 +02:00
parent 3c61d560c3
commit 32b4e9d136
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2

View file

@ -576,19 +576,13 @@ namespace Ryujinx.UI.App.Common
{ {
AppData = application, AppData = application,
}); });
numApplicationsFound++;
numApplicationsLoaded++;
}
} }
if (applications.Count > 1)
{
numApplicationsFound += applications.Count - 1;
}
numApplicationsLoaded += applications.Count;
}
else
{
numApplicationsFound--; numApplicationsFound--;
}
OnApplicationCountUpdated(new ApplicationCountUpdatedEventArgs OnApplicationCountUpdated(new ApplicationCountUpdatedEventArgs
{ {