From 3074bc1b6e2e2ab614d0e5c940de47f68b21c2bd Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 13 Jan 2020 20:42:58 -0600 Subject: [PATCH] Load Linked Profiles Related to issue #1039 --- DS4Windows/App.xaml.cs | 1 + DS4Windows/DS4Control/ControlService.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/DS4Windows/App.xaml.cs b/DS4Windows/App.xaml.cs index 5611186..1927afc 100644 --- a/DS4Windows/App.xaml.cs +++ b/DS4Windows/App.xaml.cs @@ -159,6 +159,7 @@ namespace DS4WinWPF } SetUICulture(DS4Windows.Global.UseLang); + DS4Windows.Global.LoadLinkedProfiles(); DS4Forms.MainWindow window = new DS4Forms.MainWindow(parser); MainWindow = window; window.Show(); diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 934bb6c..ca00e70 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -490,10 +490,12 @@ namespace DS4Windows if (device.isValidSerial() && containsLinkedProfile(device.getMacAddress())) { ProfilePath[i] = getLinkedProfile(device.getMacAddress()); + Global.linkedProfileCheck[i] = true; } else { ProfilePath[i] = OlderProfilePath[i]; + Global.linkedProfileCheck[i] = false; } LoadProfile(i, false, this, false, false); @@ -764,10 +766,12 @@ namespace DS4Windows if (device.isValidSerial() && containsLinkedProfile(device.getMacAddress())) { ProfilePath[Index] = getLinkedProfile(device.getMacAddress()); + Global.linkedProfileCheck[Index] = true; } else { ProfilePath[Index] = OlderProfilePath[Index]; + Global.linkedProfileCheck[Index] = false; } LoadProfile(Index, false, this, false, false); @@ -1280,6 +1284,7 @@ namespace DS4Windows inWarnMonitor[ind] = false; useDInputOnly[ind] = true; Global.activeOutDevType[ind] = OutContType.None; + Global.linkedProfileCheck[ind] = false; /*uiContext?.Post(new SendOrPostCallback((state) => { OnControllerRemoved(this, ind);