diff --git a/BizHawk.MultiClient/tools/TraceLogger.Designer.cs b/BizHawk.MultiClient/tools/TraceLogger.Designer.cs index 7296d1ca54..cf79c2d3a0 100644 --- a/BizHawk.MultiClient/tools/TraceLogger.Designer.cs +++ b/BizHawk.MultiClient/tools/TraceLogger.Designer.cs @@ -87,6 +87,7 @@ this.TraceView.TabIndex = 4; this.TraceView.UseCompatibleStateImageBehavior = false; this.TraceView.View = System.Windows.Forms.View.Details; + this.TraceView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TraceView_KeyDown); // // Script // diff --git a/BizHawk.MultiClient/tools/TraceLogger.cs b/BizHawk.MultiClient/tools/TraceLogger.cs index 68ae7a2a4a..55371b773c 100644 --- a/BizHawk.MultiClient/tools/TraceLogger.cs +++ b/BizHawk.MultiClient/tools/TraceLogger.cs @@ -12,6 +12,11 @@ namespace BizHawk.MultiClient { public partial class TraceLogger : Form { + //Log files as a path config option + //Save to file - saves what's on screen to disk (defaults to the current log file) + //Show file that is being logged to + //Browse button to set file + List Instructions = new List(); FileInfo LogFile; @@ -252,5 +257,25 @@ namespace BizHawk.MultiClient private void CloseFile() { } + + private void TraceView_KeyDown(object sender, KeyEventArgs e) + { + if (e.Control && e.KeyCode == Keys.C) + { + ListView.SelectedIndexCollection indexes = TraceView.SelectedIndices; + + if (indexes.Count > 0) + { + StringBuilder blob = new StringBuilder(); + foreach (int x in indexes) + { + blob.Append(Instructions[x]); + blob.Append('\n'); + } + blob.Remove(blob.Length - 1, 1); //Lazy way to not have a line break at the end + Clipboard.SetDataObject(blob.ToString()); + } + } + } } }