mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 03:15:30 +00:00
Do not try to register device when device description is empty.
This commit is contained in:
parent
223c911bf9
commit
140a278b3e
|
@ -103,7 +103,16 @@ namespace OpenTK.Platform.Windows
|
|||
RegistryKey regkey = GetRegistryKey(name);
|
||||
string deviceDesc = (string)regkey.GetValue("DeviceDesc");
|
||||
string deviceClass = (string)regkey.GetValue("Class");
|
||||
deviceDesc = deviceDesc.Substring(deviceDesc.LastIndexOf(';') + 1);
|
||||
|
||||
if (String.IsNullOrEmpty(deviceDesc))
|
||||
{
|
||||
Debug.Print("[Warning] Failed to retrieve device description, skipping this device.");
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
deviceDesc = deviceDesc.Substring(deviceDesc.LastIndexOf(';') + 1);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(deviceClass) && deviceClass.ToLower().Equals("keyboard"))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue