From 629390b12e5cb3729009f89a25d81ac12bb5e158 Mon Sep 17 00:00:00 2001 From: jays2kings Date: Wed, 7 May 2014 00:46:36 -0400 Subject: [PATCH] Added change of profile to log --- DS4Control/Control.cs | 16 ++++++++-------- DS4Tool/ScpForm.cs | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/DS4Control/Control.cs b/DS4Control/Control.cs index 8a012a8..6268312 100644 --- a/DS4Control/Control.cs +++ b/DS4Control/Control.cs @@ -87,13 +87,13 @@ namespace DS4Control ind++; if (System.IO.File.Exists(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Profiles\" + filename)) { - LogDebug("Controller: " + device.MacAddress + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\""); - Log.LogToTray("Controller: " + device.MacAddress + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\""); + LogDebug("Controller " + ind + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\""); + Log.LogToTray("Controller " + ind + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\""); } else { - LogDebug("Controller: " + device.MacAddress + " is using a profile not found"); - Log.LogToTray("Controller: " + device.MacAddress + " is using a profile not found"); + LogDebug("Controller " + ind + " is using a profile not found"); + Log.LogToTray("Controller " + ind + " is using a profile not found"); } if (ind >= 4) // out of Xinput devices! break; @@ -181,13 +181,13 @@ namespace DS4Control string filename = profileA[profileA.Length - 1]; if (System.IO.File.Exists(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Profiles\" + filename)) { - LogDebug("Controller: " + device.MacAddress + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\""); - Log.LogToTray("Controller: " + device.MacAddress + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\""); + LogDebug("Controller " + (Index+1) + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\""); + Log.LogToTray("Controller " + (Index + 1) + " is using Profile \"" + filename.Substring(0, filename.Length - 4) + "\""); } else { - LogDebug("Controller: " + device.MacAddress + " is using a profile not found"); - Log.LogToTray("Controller: " + device.MacAddress + " is using a profile not found"); + LogDebug("Controller " + (Index + 1) + " is using a profile not found"); + Log.LogToTray("Controller " + (Index + 1) + " is using a profile not found"); } break; diff --git a/DS4Tool/ScpForm.cs b/DS4Tool/ScpForm.cs index 6faf545..d5d9c07 100644 --- a/DS4Tool/ScpForm.cs +++ b/DS4Tool/ScpForm.cs @@ -423,6 +423,7 @@ namespace ScpServer if (!(shortcuts[tdevice].DropDownItems[i] is ToolStripSeparator)) ((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[i]).Checked = false; ((ToolStripMenuItem)shortcuts[tdevice].DropDownItems[cb.SelectedIndex]).Checked = true; + LogDebug(DateTime.Now, "Controller " + (tdevice + 1) + " is now using Profile \"" + cb.Text + "\""); shortcuts[tdevice].Text = "Edit Profile for Controller " + (tdevice + 1); Global.setAProfile(tdevice, cb.Items[cb.SelectedIndex].ToString()); Global.Save();