From 2116dfa81b4da7e50908c9bd6febe29143e4bfeb Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 25 Nov 2012 21:11:54 +0000 Subject: [PATCH] TAStudio - listview - don't redraw bg unless it changes, a few fps speed up --- BizHawk.MultiClient/tools/TAStudio.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/tools/TAStudio.cs b/BizHawk.MultiClient/tools/TAStudio.cs index 6751bf30df..c78f124596 100644 --- a/BizHawk.MultiClient/tools/TAStudio.cs +++ b/BizHawk.MultiClient/tools/TAStudio.cs @@ -102,19 +102,31 @@ namespace BizHawk.MultiClient { if (index == 0 && Global.MovieSession.Movie.StateFirstIndex == 0) { - color = Color.LightGreen; //special case for frame 0. Normally we need to go back an extra frame, but for frame 0 we can reload the rom. + if (color != Color.LightGreen) + { + color = Color.LightGreen; //special case for frame 0. Normally we need to go back an extra frame, but for frame 0 we can reload the rom. + } } else if (Global.MovieSession.Movie.FrameLagged(index)) { - color = Color.Pink; + if (color != Color.Pink) + { + color = Color.Pink; + } } else if (index > Global.MovieSession.Movie.StateFirstIndex && index <= Global.MovieSession.Movie.StateLastIndex) { - color = Color.LightGreen; + if (color != Color.LightGreen) + { + color = Color.LightGreen; + } } if (index == Global.Emulator.Frame) { - color = Color.LightBlue; + if (color != Color.LightBlue) + { + color = Color.LightBlue; + } } }