From b5b853196e3b6a7a3ceb41ded3af688324c6f585 Mon Sep 17 00:00:00 2001 From: kylethomson Date: Thu, 16 Jun 2011 01:49:12 +0000 Subject: [PATCH] --- .../Input/ControllerBinding.cs | 22 +++++++++++++++---- BizHawk.MultiClient/movie/MovieLog.cs | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/BizHawk.MultiClient/Input/ControllerBinding.cs b/BizHawk.MultiClient/Input/ControllerBinding.cs index 42db88fe53..fb8d9c25c4 100644 --- a/BizHawk.MultiClient/Input/ControllerBinding.cs +++ b/BizHawk.MultiClient/Input/ControllerBinding.cs @@ -186,8 +186,9 @@ namespace BizHawk.MultiClient input.Append("|"); for (int player = 1; player < 6; player++) { - if (!Global.MultiTrack.isActive || (Global.MultiTrack.CurrentPlayer == player) || Global.MultiTrack.RecordAll) + if (!Global.MultiTrack.isActive) { + //If we aren't in multitrack, just send all inputs as normal. input.Append(IsPressed("P" + player.ToString() + " Up") ? "U" : "."); input.Append(IsPressed("P" + player.ToString() + " Down") ? "D" : "."); input.Append(IsPressed("P" + player.ToString() + " Left") ? "L" : "."); @@ -198,15 +199,28 @@ namespace BizHawk.MultiClient input.Append(IsPressed("P" + player.ToString() + " Select") ? "S" : "."); input.Append("|"); } + else if ((Global.MultiTrack.CurrentPlayer == player) || Global.MultiTrack.RecordAll) + { + //If we are recording the current player, copy player 1's input to the current players input. + input.Append(IsPressed("P1 Up") ? "U" : "."); + input.Append(IsPressed("P1 Down") ? "D" : "."); + input.Append(IsPressed("P1 Left") ? "L" : "."); + input.Append(IsPressed("P1 Right") ? "R" : "."); + input.Append(IsPressed("P1 B1") ? "1" : "."); + input.Append(IsPressed("P1 B2") ? "2" : "."); + input.Append(IsPressed("P1 Run") ? "R" : "."); + input.Append(IsPressed("P1 Select") ? "S" : "."); + input.Append("|"); + } else { - if (Global.Emulator.Frame < MainForm.InputLog.Log.Length()) + if (Global.Emulator.Frame < InputLog.Log.Length()) //If there is input left in the log { - //Use old frame + //Use old frame's input } else { - //Add blank frame + //Add blank frame of input for (int buttoncount = 0; buttoncount < 8; buttoncount++); input.Append("."); input.Append("|"); diff --git a/BizHawk.MultiClient/movie/MovieLog.cs b/BizHawk.MultiClient/movie/MovieLog.cs index 1f4b651692..0614c9dbae 100644 --- a/BizHawk.MultiClient/movie/MovieLog.cs +++ b/BizHawk.MultiClient/movie/MovieLog.cs @@ -8,7 +8,7 @@ namespace BizHawk.MultiClient /// /// Represents the controller key presses of a movie /// - class MovieLog + public class MovieLog { //TODO: Insert(int frame) not useful for convenctional tasing but TAStudio will want it