catch occasional container iteration exception when starting full-screen game

This commit is contained in:
Kang Yu 2024-08-07 22:31:55 -07:00
parent b1888cbf9b
commit e99518f23b

View file

@ -539,12 +539,6 @@ namespace PersistentWindows.Common
if (fullScreenGamingWindows.Contains(foreGroundWindow))
return;
foreach (var hwnd in fullScreenGamingWindows)
{
if (IsFullScreen(hwnd))
return;
}
Log.Trace("Capture timer expired");
BatchCaptureApplicationsOnCurrentDisplays();
});
@ -2409,6 +2403,12 @@ namespace PersistentWindows.Common
{
try
{
foreach (var hwnd in fullScreenGamingWindows)
{
if (IsFullScreen(hwnd))
return;
}
if (restoringFromMem)
{
return;