Fixed GoToFrame with frame = 1. Added color constants for invalid greenzone and lagzone.

This commit is contained in:
kylelyk 2014-08-22 16:05:06 +00:00
parent b2c3530164
commit af837640b4
2 changed files with 7 additions and 3 deletions

View File

@ -22,10 +22,14 @@ namespace BizHawk.Client.EmuHawk
public static Color CurrentFrame_InputLog = Color.FromArgb(0xB5E7F7);
public static Color GreenZone_FrameCol = Color.FromArgb(0xDDFFDD);
public static Color GreenZone_Invalidated_FrameCol = Color.FromArgb(0xFFFFFF);
public static Color GreenZone_InputLog = Color.FromArgb(0xC4F7C8);
public static Color GreenZone_Invalidated_InputLog = Color.FromArgb(0xE0FBE0);
public static Color LagZone_FrameCol = Color.FromArgb(0xFFDCDD);
public static Color LagZone_Invalidated_FrameCol = Color.FromArgb(0xFFE9E9);
public static Color LagZone_InputLog = Color.FromArgb(0xF0D0D2);
public static Color LagZone_Invalidated_InputLog = Color.FromArgb(0xF7E5E5);
public static Color NoState_GreenZone_FrameCol = Color.FromArgb(0xF9FFF9);
public static Color NoState_GreenZone_InputLog = Color.FromArgb(0xE0FBE0);

View File

@ -264,12 +264,12 @@ namespace BizHawk.Client.EmuHawk
{
var goToFrame = frame == 0 ? 0 : frame - 1;
if (_currentTasMovie[goToFrame].HasState) // Go back 1 frame and emulate
if (_currentTasMovie[goToFrame].HasState) // Go back 1 frame and emulate to get the display (we don't store that)
{
_currentTasMovie.SwitchToPlay();
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(_currentTasMovie[goToFrame].State.ToArray())));
if (goToFrame > 0) // We can't emulate up to frame 0!
if (frame > 0) // We can't emulate up to frame 0!
{
Global.Emulator.FrameAdvance(true);
}
@ -277,7 +277,7 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.DisplayManager.NeedsToPaint = true;
TasView.ensureVisible(frame);
}
else
else//Goto last emulated frame, then unpause until we reach frame
{
_currentTasMovie.SwitchToPlay();
Global.Emulator.LoadStateBinary(new BinaryReader(new MemoryStream(_currentTasMovie[_currentTasMovie.LastEmulatedFrame].State.ToArray())));