mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
fix dead-loop in TrimQueue()
This commit is contained in:
parent
62452f3e0b
commit
de1b815d57
1 changed files with 1 additions and 2 deletions
|
@ -2214,7 +2214,7 @@ namespace PersistentWindows.Common
|
||||||
|
|
||||||
private void TrimQueue(string displayKey, IntPtr hwnd)
|
private void TrimQueue(string displayKey, IntPtr hwnd)
|
||||||
{
|
{
|
||||||
while (monitorApplications[displayKey][hwnd].Count > MaxHistoryQueueLength)
|
if (monitorApplications[displayKey][hwnd].Count > MaxHistoryQueueLength)
|
||||||
{
|
{
|
||||||
// limit length of snapshot capture history
|
// limit length of snapshot capture history
|
||||||
ulong acc_flags = 0;
|
ulong acc_flags = 0;
|
||||||
|
@ -2227,7 +2227,6 @@ namespace PersistentWindows.Common
|
||||||
{
|
{
|
||||||
Log.Event($"trim redundant snapshot record for {windowTitle[hwnd]}");
|
Log.Event($"trim redundant snapshot record for {windowTitle[hwnd]}");
|
||||||
monitorApplications[displayKey][hwnd].RemoveAt(i);
|
monitorApplications[displayKey][hwnd].RemoveAt(i);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
acc_flags |= snapshot_flags;
|
acc_flags |= snapshot_flags;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue