From 1ef25132a13a181b670b39eed61ada822bde2ab3 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 11 Jul 2014 18:17:48 +0000 Subject: [PATCH] TAStudio - restore copy functionality including generating an input log and putting it on the clipboard --- BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index d49f51edab..5b99ab296f 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -7,6 +7,7 @@ using System.Windows.Forms; using BizHawk.Client.Common; using BizHawk.Client.Common.MovieConversionExtensions; +using System.Text; namespace BizHawk.Client.EmuHawk { @@ -375,12 +376,18 @@ namespace BizHawk.Client.EmuHawk { _tasClipboard.Clear(); var list = TasView.SelectedIndices; + var sb = new StringBuilder(); for (var i = 0; i < list.Count; i++) { - //Serialize TODO - //_tasClipboard.Add(new TasClipboardEntry(list[i], _tas[i].Buttons)); + var input = _tas.GetInputState(i); + _tasClipboard.Add(new TasClipboardEntry(i, input)); + var lg = _tas.LogGeneratorInstance(); + lg.SetSource(input); + sb.AppendLine(lg.GenerateLogEntry()); } + Clipboard.SetDataObject(sb.ToString()); + SetSplicer(); }