From 16771bb6bf5d918b2bba67c555982be56e265782 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 23 Aug 2020 17:56:01 -0500 Subject: [PATCH] ZwinderStateManager - speedup and simply the Last property using StateCache --- src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs b/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs index 17329eefa7..b4b620b900 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManager.cs @@ -159,7 +159,7 @@ namespace BizHawk.Client.Common .OrderByDescending(s => s.Frame); } - public int Last => AllStates().First().Frame; + public int Last => StateCache.Max(); private int LastRing => CurrentAndRecentStates().FirstOrDefault()?.Frame ?? 0;