diff --git a/InputTest/InputTest.csproj b/InputTest/InputTest.csproj
new file mode 100644
index 00000000..4b42890f
--- /dev/null
+++ b/InputTest/InputTest.csproj
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+ Exe
+ netcoreapp3.0
+
+
+
diff --git a/InputTest/Program.cs b/InputTest/Program.cs
new file mode 100644
index 00000000..cea67caf
--- /dev/null
+++ b/InputTest/Program.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Threading;
+using OpenTK;
+using OpenTK.Input;
+using OpenTK.Platform;
+
+
+namespace InputTest
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Toolkit.Init(new ToolkitOptions()
+ {
+ Backend = PlatformBackend.PreferNative,
+ EnableHighResolution = true
+ });
+ Console.WriteLine("Testing Keyboard");
+
+ while (true)
+ {
+ var keyboard = Keyboard.GetState();
+ if (keyboard.IsAnyKeyDown)
+ {
+ Console.WriteLine("Key detected. Working");
+ break;
+ }
+
+ Thread.Sleep(500);
+ }
+ }
+ }
+}
diff --git a/OpenTK.sln b/OpenTK.sln
index 37733420..17063d19 100644
--- a/OpenTK.sln
+++ b/OpenTK.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27703.2000
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29411.108
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator.Bind", "src\Generator.Bind\Generator.Bind.csproj", "{31D19132-0000-0000-0000-000000000000}"
EndProject
@@ -45,6 +45,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "OpenTK.Tests.Generators", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTK.Standard", "src\OpenTK\OpenTK.Standard.csproj", "{67F02FD3-8F7F-4D89-8551-359993271CA3}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InputTest", "InputTest\InputTest.csproj", "{BC138ACD-99EC-44ED-BBCF-731EADF06C42}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -103,6 +105,10 @@ Global
{67F02FD3-8F7F-4D89-8551-359993271CA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67F02FD3-8F7F-4D89-8551-359993271CA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67F02FD3-8F7F-4D89-8551-359993271CA3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BC138ACD-99EC-44ED-BBCF-731EADF06C42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BC138ACD-99EC-44ED-BBCF-731EADF06C42}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BC138ACD-99EC-44ED-BBCF-731EADF06C42}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BC138ACD-99EC-44ED-BBCF-731EADF06C42}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/OpenTK/OpenTK.Standard.csproj b/src/OpenTK/OpenTK.Standard.csproj
index 13464ca6..d99151d3 100644
--- a/src/OpenTK/OpenTK.Standard.csproj
+++ b/src/OpenTK/OpenTK.Standard.csproj
@@ -1,7 +1,7 @@
OpenTK
- netstandard2.0
+ netcoreapp3.0
OpenTK
$(DefineConstants);WIN32;CARBON;X11;SDL2;OPENGL;OPENGLES;MINIMAL
@@ -68,7 +68,7 @@
true
- 1.0.4
+ 1.0.5.0
The Open Toolkit library (OpenTK) is an advanced, low-level C# wrapper for OpenGL, OpenGL ES and OpenAL.
It is suitable for games, scientific visualizations and projects that require 3d graphics, audio or compute functionality.
@@ -84,8 +84,8 @@ This version can be found at https://github.com/emmauss/opentk
emmaus
OpenTK
https://github.com/emmauss/opentk
- 1.0.4.0
- 1.0.4.0
+ 1.0.5.0
+ 1.0.5.0
@@ -108,7 +108,8 @@ This version can be found at https://github.com/emmauss/opentk
-
+
+
diff --git a/src/OpenTK/Platform/Windows/WinGLNative.cs b/src/OpenTK/Platform/Windows/WinGLNative.cs
index d2eebd88..256102a6 100644
--- a/src/OpenTK/Platform/Windows/WinGLNative.cs
+++ b/src/OpenTK/Platform/Windows/WinGLNative.cs
@@ -1243,15 +1243,10 @@ namespace OpenTK.Platform.Windows
}
}
}
-#if !NETSTANDARD
- Debug.Assert(oldCursorHandle != IntPtr.Zero);
- Debug.Assert(oldCursorHandle != cursor_handle);
- Debug.Assert(oldCursor != cursor);
-#else
System.Diagnostics.Debug.Assert(oldCursorHandle != IntPtr.Zero);
System.Diagnostics.Debug.Assert(oldCursorHandle != cursor_handle);
System.Diagnostics.Debug.Assert(oldCursor != cursor);
-#endif
+
// If we've replaced a custom (non-default) cursor we need to free the handle.
if (oldCursor != MouseCursor.Default)
{
diff --git a/src/OpenTK/Platform/Windows/WinRawKeyboard.cs b/src/OpenTK/Platform/Windows/WinRawKeyboard.cs
index bee7eca8..36f2aa22 100644
--- a/src/OpenTK/Platform/Windows/WinRawKeyboard.cs
+++ b/src/OpenTK/Platform/Windows/WinRawKeyboard.cs
@@ -27,9 +27,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
-#if !(ANDROID || IPHONE || MINIMAL)
using Microsoft.Win32;
-#endif
using OpenTK.Input;
using OpenTK.Platform.Common;
@@ -96,7 +94,7 @@ namespace OpenTK.Platform.Windows
{
// This is a keyboard or USB keyboard device. In the latter case, discover if it really is a
// keyboard device by qeurying the registry.
- RegistryKey regkey = GetRegistryKey(name);
+ var regkey = GetRegistryKey(name);
if (regkey == null)
{
continue;
@@ -108,7 +106,7 @@ namespace OpenTK.Platform.Windows
// 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);
+ var classGUIDKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
deviceClass = classGUIDKey != null ? (string)classGUIDKey.GetValue("Class") : string.Empty;
}
@@ -204,7 +202,7 @@ namespace OpenTK.Platform.Windows
return processed;
}
- private static RegistryKey GetRegistryKey(string name)
+ private static Microsoft.Win32.RegistryKey GetRegistryKey(string name)
{
if (name.Length < 4)
{
@@ -226,10 +224,12 @@ namespace OpenTK.Platform.Windows
// The final part is the class GUID and is not needed here
string findme = string.Format(
- @"System\CurrentControlSet\Enum\{0}\{1}\{2}",
+ @"SYSTEM\CurrentControlSet\Enum\{0}\{1}\{2}",
id_01, id_02, id_03);
- RegistryKey regkey = Registry.LocalMachine.OpenSubKey(findme);
+
+ var shellKey = Microsoft.Win32.RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry64);
+ Microsoft.Win32.RegistryKey regkey = shellKey.OpenSubKey(findme);
return regkey;
}
diff --git a/te/Class1.cs b/te/Class1.cs
new file mode 100644
index 00000000..9ac46fe9
--- /dev/null
+++ b/te/Class1.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace te
+{
+ public class Class1
+ {
+ }
+}
diff --git a/te/te.csproj b/te/te.csproj
new file mode 100644
index 00000000..ea83d296
--- /dev/null
+++ b/te/te.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netcoreapp3.0
+
+
+