mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-01 05:18:25 +00:00
Address mouse on windows 8 for OpenTK issue 3198
This commit is contained in:
parent
27d2cb451f
commit
224a296220
|
@ -111,7 +111,15 @@ namespace OpenTK.Platform.Windows
|
||||||
// mouse device by qeurying the registry.
|
// mouse device by qeurying the registry.
|
||||||
RegistryKey regkey = FindRegistryKey(name);
|
RegistryKey regkey = FindRegistryKey(name);
|
||||||
string deviceDesc = (string)regkey.GetValue("DeviceDesc");
|
string deviceDesc = (string)regkey.GetValue("DeviceDesc");
|
||||||
string deviceClass = (string)regkey.GetValue("Class");
|
|
||||||
|
|
||||||
|
string deviceClass = (string)regkey.GetValue("Class") as string;
|
||||||
|
if(deviceClass == null){
|
||||||
|
// Added to address OpenTK issue 3198 with mouse on Windows 8
|
||||||
|
string deviceClassGUID = (string)regkey.GetValue("ClassGUID");
|
||||||
|
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
||||||
|
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
|
||||||
|
}
|
||||||
deviceDesc = deviceDesc.Substring(deviceDesc.LastIndexOf(';') + 1);
|
deviceDesc = deviceDesc.Substring(deviceDesc.LastIndexOf(';') + 1);
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(deviceClass) && deviceClass.ToLower().Equals("mouse"))
|
if (!String.IsNullOrEmpty(deviceClass) && deviceClass.ToLower().Equals("mouse"))
|
||||||
|
|
Loading…
Reference in a new issue