mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 06:55:37 +00:00
Fix Windows 8 Keyboard, OpenTK issue 3198
This commit is contained in:
parent
6500e176df
commit
fa422dca2a
|
@ -102,7 +102,16 @@ namespace OpenTK.Platform.Windows
|
||||||
// keyboard device by qeurying the registry.
|
// keyboard device by qeurying the registry.
|
||||||
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");
|
||||||
|
|
||||||
|
string deviceClassGUID = (string)regkey.GetValue("ClassGUID"); // for windows 8 support via OpenTK issue 3198
|
||||||
|
|
||||||
|
// making a guess at backwards compatability. Not sure what older windows returns in these cases...
|
||||||
|
if(deviceClass != null || deviceClass.Equals(string.Empty)){
|
||||||
|
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
||||||
|
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(deviceDesc))
|
if (String.IsNullOrEmpty(deviceDesc))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue