From 3c4771c76a69c02b1a2d00a50bea1ca9df5a094f Mon Sep 17 00:00:00 2001 From: feos Date: Sun, 28 Feb 2016 23:01:22 +0300 Subject: [PATCH] tracer: print header when switching to file while already enabled. --- BizHawk.Client.EmuHawk/tools/TraceLogger.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/tools/TraceLogger.cs b/BizHawk.Client.EmuHawk/tools/TraceLogger.cs index 878a02e5e5..ccb0c2f82d 100644 --- a/BizHawk.Client.EmuHawk/tools/TraceLogger.cs +++ b/BizHawk.Client.EmuHawk/tools/TraceLogger.cs @@ -324,7 +324,7 @@ namespace BizHawk.Client.EmuHawk FileBox.Visible = true; BrowseBox.Visible = true; var name = PathManager.FilesystemSafeName(Global.Game); - var filename = Path.Combine(PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPathFragment, null), name) + ".txt"; + var filename = Path.Combine(PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPathFragment, null), name) + ".log"; _logFile = new FileInfo(filename); if (_logFile.Directory != null && !_logFile.Directory.Exists) { @@ -339,6 +339,12 @@ namespace BizHawk.Client.EmuHawk using (_logFile.Create()) { } FileBox.Text = _logFile.FullName; + + if (LoggingEnabled.Checked && _logFile != null) + { + StartLogFile(_logFile); + OpenLogFile.Enabled = true; + } } else {