mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-25 23:01:01 +00:00
Merge remote-tracking branch 'origin/master' into sdl2
This commit is contained in:
commit
5bb23585b9
|
@ -120,7 +120,14 @@ namespace OpenTK.Platform.Windows
|
||||||
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
||||||
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
|
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
|
||||||
}
|
}
|
||||||
deviceDesc = deviceDesc.Substring(deviceDesc.LastIndexOf(';') + 1);
|
|
||||||
|
// deviceDesc remained null on a new Win7 system - not sure why.
|
||||||
|
// Since the description is not vital information, use a dummy description
|
||||||
|
// when that happens.
|
||||||
|
if (String.IsNullOrEmpty(deviceDesc))
|
||||||
|
deviceDesc = "Windows Mouse " + mice.Count;
|
||||||
|
else
|
||||||
|
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