prevent crashes when loading up leaderboard forms

apparently some game had 2002 leaderboards which caused a crash when making a form for every one of them in the leaderboard list, I guess windows has a limit on the amount of forms that can be active at once?
this is a quick hack to prevent such a crash, design needs to be rethought
This commit is contained in:
CasualPokePlayer 2023-04-20 08:57:41 -07:00
parent 1356bc6a3f
commit efa6505826
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ namespace BizHawk.Client.EmuHawk
{
flowLayoutPanel1.Controls.Clear();
DisposeLboardForms();
_lboardForms = lboards.Select(lboard => new RCheevosLeaderboardForm(lboard)).ToArray();
_lboardForms = lboards.Take(128).Select(lboard => new RCheevosLeaderboardForm(lboard)).ToArray();
flowLayoutPanel1.Controls.AddRange(_lboardForms);
}