From efd90d56a1b0da38700b5e4db4a9de81e382d12b Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 15 Apr 2020 18:37:53 -0500 Subject: [PATCH] Removed some ViGEmBus checks --- DS4Windows/DS4Control/ControlService.cs | 8 +++++--- DS4Windows/DS4Control/ScpUtil.cs | 9 +++++++-- DS4Windows/DS4Forms/MainWindow.xaml.cs | 5 +++-- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index a9ae63b..b8ba368 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -525,7 +525,8 @@ namespace DS4Windows if (showlog) LogDebug(DS4WinWPF.Properties.Resources.Starting); - LogDebug($"Connection to ViGEmBus {Global.vigembusVersion} established"); + //LogDebug($"Connection to ViGEmBus {Global.vigembusVersion} established"); + LogDebug($"Connection to ScpVBus established"); DS4Devices.isExclusiveMode = getUseExclusiveMode(); //uiContext = tempui as SynchronizationContext; @@ -681,14 +682,15 @@ namespace DS4Windows else { string logMessage = string.Empty; - if (!vigemInstalled) + /*if (!vigemInstalled) { logMessage = "ViGEmBus is not installed"; } else { logMessage = "Could not connect to ViGEmBus. Please check the status of the System device in Device Manager and if Visual C++ 2017 Redistributable is installed."; - } + }*/ + logMessage = "Could not connect to ScpVBus"; LogDebug(logMessage); AppLogger.LogToTray(logMessage); diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 4b97d73..59b4468 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -262,9 +262,9 @@ namespace DS4Windows public static OutContType[] activeOutDevType = new OutContType[5] { DS4Windows.OutContType.None, DS4Windows.OutContType.None, DS4Windows.OutContType.None, DS4Windows.OutContType.None, DS4Windows.OutContType.None }; - public static bool vigemInstalled = IsViGEmBusInstalled(); + //public static bool vigemInstalled = IsViGEmBusInstalled(); public static bool hidguardInstalled = IsHidGuardianInstalled(); - public static string vigembusVersion = ViGEmBusVersion(); + //public static string vigembusVersion = ViGEmBusVersion(); public static X360Controls[] defaultButtonMapping = { X360Controls.None, X360Controls.LXNeg, X360Controls.LXPos, X360Controls.LYNeg, X360Controls.LYPos, X360Controls.RXNeg, X360Controls.RXPos, X360Controls.RYNeg, X360Controls.RYPos, @@ -634,6 +634,11 @@ namespace DS4Windows return CheckForDevice(VIGEMBUS_GUID); } + public static bool IsScpVBusInstalled() + { + return CheckForSysDevice(@"root\ScpVBus"); + } + public static string ViGEmBusVersion() { return GetViGEmDriverProperty(NativeMethods.DEVPKEY_Device_DriverVersion); diff --git a/DS4Windows/DS4Forms/MainWindow.xaml.cs b/DS4Windows/DS4Forms/MainWindow.xaml.cs index c647294..9c240d6 100644 --- a/DS4Windows/DS4Forms/MainWindow.xaml.cs +++ b/DS4Windows/DS4Forms/MainWindow.xaml.cs @@ -126,7 +126,7 @@ namespace DS4WinWPF.DS4Forms { Task tempTask = Task.Run(() => { - CheckDrivers(); + //CheckDrivers(); if (!parser.Stop) { Dispatcher.BeginInvoke((Action)(() => @@ -1193,7 +1193,8 @@ Suspend support not enabled.", true); private void CheckDrivers() { - bool deriverinstalled = Global.IsViGEmBusInstalled(); + //bool deriverinstalled = Global.IsViGEmBusInstalled(); + bool deriverinstalled = Global.IsScpVBusInstalled(); if (!deriverinstalled) { Process p = new Process();