WinRawInput requires Windows 5.1 (XP) or higher.

This commit is contained in:
the_fiddler 2010-11-08 21:40:43 +00:00
parent 045d3d73f6
commit 1bacea0779

View file

@ -95,10 +95,12 @@ namespace OpenTK.Platform.Windows
if (inputDriver == null)
{
// If Windows version is NT5 or higher, we are able to use raw input.
if (System.Environment.OSVersion.Version.Major >= 5)
if (System.Environment.OSVersion.Version.Major > 5 ||
(System.Environment.OSVersion.Version.Major == 5 &&
System.Environment.OSVersion.Version.Minor > 0))
inputDriver = new WinRawInput();
else
inputDriver = new WMInput(null);
inputDriver = new WMInput();
}
return inputDriver;
}