mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-07 19:20:41 +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);
|
RegistryKey regkey = GetRegistryKey(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");
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(deviceDesc))
|
||||||
|
{
|
||||||
|
Debug.Print("[Warning] Failed to retrieve device description, skipping this device.");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
deviceDesc = deviceDesc.Substring(deviceDesc.LastIndexOf(';') + 1);
|
deviceDesc = deviceDesc.Substring(deviceDesc.LastIndexOf(';') + 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(deviceClass) && deviceClass.ToLower().Equals("keyboard"))
|
if (!String.IsNullOrEmpty(deviceClass) && deviceClass.ToLower().Equals("keyboard"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue