From c847e1f0e440d6137d7d93cb92db83b2669c4711 Mon Sep 17 00:00:00 2001 From: emmaus Date: Sat, 13 Oct 2018 10:22:50 +0000 Subject: [PATCH] fix keyboard detection on windows, removed minimal --- OpenTK.sln | 6 ++++++ src/OpenTK/Graphics/Color4.cs | 2 -- src/OpenTK/Graphics/ES20/Helper.cs | 2 -- src/OpenTK/Graphics/ES30/Helper.cs | 2 -- src/OpenTK/Graphics/OpenGL/GLHelper.cs | 4 +--- src/OpenTK/Graphics/OpenGL4/Helper.cs | 2 -- src/OpenTK/INativeWindow.cs | 2 -- src/OpenTK/Minimal.cs | 2 +- src/OpenTK/NativeWindow.cs | 2 -- src/OpenTK/OpenTK.Standard.csproj | 12 +++++++----- src/OpenTK/Platform/Linux/LinuxNativeWindow.cs | 2 -- src/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs | 2 -- src/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs | 2 -- src/OpenTK/Platform/MacOS/CocoaNativeWindow.cs | 2 -- src/OpenTK/Platform/NativeWindowBase.cs | 2 -- src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs | 6 ------ src/OpenTK/Platform/Windows/API.cs | 2 +- src/OpenTK/Platform/Windows/WinDisplayDevice.cs | 2 -- src/OpenTK/Platform/Windows/WinGLNative.cs | 2 -- src/OpenTK/Platform/Windows/WinRawKeyboard.cs | 2 +- src/OpenTK/Platform/X11/Functions.cs | 7 ++----- src/OpenTK/Platform/X11/X11GLNative.cs | 2 -- 22 files changed, 19 insertions(+), 50 deletions(-) diff --git a/OpenTK.sln b/OpenTK.sln index 2ecf3a21..adbca2d1 100644 --- a/OpenTK.sln +++ b/OpenTK.sln @@ -45,6 +45,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "vk.generator", "src\vk.gene EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "vk.rewrite", "src\vk.rewrite\vk.rewrite.csproj", "{3E9B1C4D-BCB4-418A-A94E-DD164A19C6A2}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "test", "..\opentk-examples\src\test\test.csproj", "{9FA5D0A1-BE90-476D-8BA7-3C1A0D9D7D4A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -103,6 +105,10 @@ Global {3E9B1C4D-BCB4-418A-A94E-DD164A19C6A2}.Debug|Any CPU.Build.0 = Debug|Any CPU {3E9B1C4D-BCB4-418A-A94E-DD164A19C6A2}.Release|Any CPU.ActiveCfg = Release|Any CPU {3E9B1C4D-BCB4-418A-A94E-DD164A19C6A2}.Release|Any CPU.Build.0 = Release|Any CPU + {9FA5D0A1-BE90-476D-8BA7-3C1A0D9D7D4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FA5D0A1-BE90-476D-8BA7-3C1A0D9D7D4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FA5D0A1-BE90-476D-8BA7-3C1A0D9D7D4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FA5D0A1-BE90-476D-8BA7-3C1A0D9D7D4A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/OpenTK/Graphics/Color4.cs b/src/OpenTK/Graphics/Color4.cs index d5c16bed..e89fd4b0 100644 --- a/src/OpenTK/Graphics/Color4.cs +++ b/src/OpenTK/Graphics/Color4.cs @@ -24,9 +24,7 @@ // using System; -#if !MINIMAL using System.Drawing; -#endif namespace OpenTK.Graphics { diff --git a/src/OpenTK/Graphics/ES20/Helper.cs b/src/OpenTK/Graphics/ES20/Helper.cs index 70330e1a..4f7705fa 100644 --- a/src/OpenTK/Graphics/ES20/Helper.cs +++ b/src/OpenTK/Graphics/ES20/Helper.cs @@ -24,9 +24,7 @@ // using System; -#if !MINIMAL using System.Drawing; -#endif using System.Runtime.InteropServices; using System.Text; diff --git a/src/OpenTK/Graphics/ES30/Helper.cs b/src/OpenTK/Graphics/ES30/Helper.cs index c2a98381..32742d73 100644 --- a/src/OpenTK/Graphics/ES30/Helper.cs +++ b/src/OpenTK/Graphics/ES30/Helper.cs @@ -24,9 +24,7 @@ // using System; -#if !MINIMAL using System.Drawing; -#endif using System.Runtime.InteropServices; using System.Text; diff --git a/src/OpenTK/Graphics/OpenGL/GLHelper.cs b/src/OpenTK/Graphics/OpenGL/GLHelper.cs index e8887b14..7d245be5 100644 --- a/src/OpenTK/Graphics/OpenGL/GLHelper.cs +++ b/src/OpenTK/Graphics/OpenGL/GLHelper.cs @@ -25,9 +25,7 @@ using System; -#if !MINIMAL using System.Drawing; -#endif using System.Text; using System.Runtime.InteropServices; @@ -2772,7 +2770,7 @@ namespace OpenTK.Graphics.OpenGL } } } -#if MINIMAL +#if !MINIMAL /// /// [requires: v1.0] /// Set the viewport. This function assumes a lower left corner of (0, 0). diff --git a/src/OpenTK/Graphics/OpenGL4/Helper.cs b/src/OpenTK/Graphics/OpenGL4/Helper.cs index f2ead011..c7b5a9d0 100644 --- a/src/OpenTK/Graphics/OpenGL4/Helper.cs +++ b/src/OpenTK/Graphics/OpenGL4/Helper.cs @@ -24,9 +24,7 @@ // using System; -#if !MINIMAL using System.Drawing; -#endif using System.Runtime.InteropServices; using System.Text; diff --git a/src/OpenTK/INativeWindow.cs b/src/OpenTK/INativeWindow.cs index f831899a..e0a4d05c 100644 --- a/src/OpenTK/INativeWindow.cs +++ b/src/OpenTK/INativeWindow.cs @@ -25,9 +25,7 @@ using System; using System.ComponentModel; -#if !MINIMAL using System.Drawing; -#endif using OpenTK.Platform; namespace OpenTK diff --git a/src/OpenTK/Minimal.cs b/src/OpenTK/Minimal.cs index 03b5ae56..910716fb 100644 --- a/src/OpenTK/Minimal.cs +++ b/src/OpenTK/Minimal.cs @@ -1,4 +1,4 @@ -#if ANDROID || IPHONE || MINIMAL +#if (ANDROID || IPHONE || MINIMAL) && !NETSTANDARD using System; #if !MINIMAL diff --git a/src/OpenTK/NativeWindow.cs b/src/OpenTK/NativeWindow.cs index d07f845a..fa26abe1 100644 --- a/src/OpenTK/NativeWindow.cs +++ b/src/OpenTK/NativeWindow.cs @@ -25,9 +25,7 @@ using System; using System.ComponentModel; -#if !MINIMAL using System.Drawing; -#endif using OpenTK.Graphics; using OpenTK.Graphics.Vulkan; using OpenTK.Input; diff --git a/src/OpenTK/OpenTK.Standard.csproj b/src/OpenTK/OpenTK.Standard.csproj index 3b93acd7..e23646d0 100644 --- a/src/OpenTK/OpenTK.Standard.csproj +++ b/src/OpenTK/OpenTK.Standard.csproj @@ -3,7 +3,7 @@ OpenTK netstandard2.0 OpenTK - DEBUG;TRACE;WIN32;CARBON;X11;OPENGL;OPENGLES;MINIMAL + TRACE;DEBUG;WIN32;CARBON;X11;OPENGL;OPENGLES;NETSTANDARD True @@ -68,7 +68,7 @@ true - 1.0.5 + 1.0.7 The Open Toolkit library (OpenTK) is an advanced, low-level C# wrapper for OpenGL, OpenGL ES, OpenAL and Vulkan. 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/Ryujinx/Opentk emmaus OpenTK https://github.com/Ryujinx/Opentk - 1.0.5.0 - 1.0.5.0 + 1.0.7.0 + 1.0.7.0 @@ -108,7 +108,9 @@ This version can be found at https://github.com/Ryujinx/Opentk - + + + diff --git a/src/OpenTK/Platform/Linux/LinuxNativeWindow.cs b/src/OpenTK/Platform/Linux/LinuxNativeWindow.cs index b9c88608..f7bb70f6 100644 --- a/src/OpenTK/Platform/Linux/LinuxNativeWindow.cs +++ b/src/OpenTK/Platform/Linux/LinuxNativeWindow.cs @@ -27,9 +27,7 @@ using System; using System.Diagnostics; -#if !MINIMAL using System.Drawing; -#endif using OpenTK.Graphics; using OpenTK.Input; using OpenTK.Platform.Egl; diff --git a/src/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs b/src/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs index 459117c1..2a28c200 100644 --- a/src/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs +++ b/src/OpenTK/Platform/MacOS/Cocoa/Cocoa.cs @@ -27,10 +27,8 @@ using System.Runtime.InteropServices; using System; -#if !MINIMAL using System.Drawing; using System.Drawing.Imaging; -#endif namespace OpenTK.Platform.MacOS { diff --git a/src/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs b/src/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs index 8ee2a7e1..242063aa 100644 --- a/src/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs +++ b/src/OpenTK/Platform/MacOS/Cocoa/NSFloat.cs @@ -26,9 +26,7 @@ // using System; -#if !MINIMAL using System.Drawing; -#endif using System.Runtime.InteropServices; namespace OpenTK.Platform.MacOS diff --git a/src/OpenTK/Platform/MacOS/CocoaNativeWindow.cs b/src/OpenTK/Platform/MacOS/CocoaNativeWindow.cs index 4cae30fe..dfbf577a 100644 --- a/src/OpenTK/Platform/MacOS/CocoaNativeWindow.cs +++ b/src/OpenTK/Platform/MacOS/CocoaNativeWindow.cs @@ -28,9 +28,7 @@ using System; using System.ComponentModel; using System.Diagnostics; -#if !MINIMAL using System.Drawing; -#endif using System.Runtime.InteropServices; using System.Threading; using OpenTK.Graphics; diff --git a/src/OpenTK/Platform/NativeWindowBase.cs b/src/OpenTK/Platform/NativeWindowBase.cs index 24d57f60..4637d2e4 100644 --- a/src/OpenTK/Platform/NativeWindowBase.cs +++ b/src/OpenTK/Platform/NativeWindowBase.cs @@ -28,9 +28,7 @@ using System; using System.ComponentModel; using System.Diagnostics; -#if !MINIMAL using System.Drawing; -#endif using OpenTK.Input; namespace OpenTK.Platform diff --git a/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs b/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs index 885dd285..c2f0a5e3 100644 --- a/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs +++ b/src/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs @@ -26,14 +26,8 @@ using System; using System.Collections.Generic; using System.Diagnostics; -#if !MINIMAL using System.Drawing; -#endif -#if ANDROID || IPHONE || MINIMAL -using OpenTK.Minimal; -#else using System.Drawing.Imaging; -#endif using System.Runtime.InteropServices; using OpenTK.Input; using System.Text; diff --git a/src/OpenTK/Platform/Windows/API.cs b/src/OpenTK/Platform/Windows/API.cs index 6a751cd6..71509696 100644 --- a/src/OpenTK/Platform/Windows/API.cs +++ b/src/OpenTK/Platform/Windows/API.cs @@ -2717,7 +2717,7 @@ namespace OpenTK.Platform.Windows public char dbcc_name; } -#if ANDROID || IPHONE || MINIMAL +#if (ANDROID || IPHONE || MINIMAL) && !NETSTANDARD internal class RegistryKey { diff --git a/src/OpenTK/Platform/Windows/WinDisplayDevice.cs b/src/OpenTK/Platform/Windows/WinDisplayDevice.cs index c84e8a9f..7e424446 100644 --- a/src/OpenTK/Platform/Windows/WinDisplayDevice.cs +++ b/src/OpenTK/Platform/Windows/WinDisplayDevice.cs @@ -26,9 +26,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; -#if !MINIMAL using Microsoft.Win32; -#endif namespace OpenTK.Platform.Windows { diff --git a/src/OpenTK/Platform/Windows/WinGLNative.cs b/src/OpenTK/Platform/Windows/WinGLNative.cs index afa71e50..3cc6f44a 100644 --- a/src/OpenTK/Platform/Windows/WinGLNative.cs +++ b/src/OpenTK/Platform/Windows/WinGLNative.cs @@ -28,10 +28,8 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; using OpenTK.Input; -#if !MINIMAL using System.Drawing; using System.Drawing.Imaging; -#endif namespace OpenTK.Platform.Windows { diff --git a/src/OpenTK/Platform/Windows/WinRawKeyboard.cs b/src/OpenTK/Platform/Windows/WinRawKeyboard.cs index bee7eca8..c1ff14f4 100644 --- a/src/OpenTK/Platform/Windows/WinRawKeyboard.cs +++ b/src/OpenTK/Platform/Windows/WinRawKeyboard.cs @@ -27,7 +27,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.InteropServices; -#if !(ANDROID || IPHONE || MINIMAL) +#if !(ANDROID || IPHONE || MINIMAL) || NETSTANDARD using Microsoft.Win32; #endif using OpenTK.Input; diff --git a/src/OpenTK/Platform/X11/Functions.cs b/src/OpenTK/Platform/X11/Functions.cs index 288e306b..c56095ab 100644 --- a/src/OpenTK/Platform/X11/Functions.cs +++ b/src/OpenTK/Platform/X11/Functions.cs @@ -5,14 +5,11 @@ */ using System; -#if !MINIMAL using System.Drawing; -#endif -#if ANDROID || IPHONE || MINIMAL +#if (ANDROID || IPHONE || MINIMAL) && !NETSTANDARD using OpenTK.Minimal; -#else -using System.Drawing.Imaging; #endif +using System.Drawing.Imaging; using System.Text; using System.Runtime.InteropServices; diff --git a/src/OpenTK/Platform/X11/X11GLNative.cs b/src/OpenTK/Platform/X11/X11GLNative.cs index 4de9eb85..6a3e4964 100644 --- a/src/OpenTK/Platform/X11/X11GLNative.cs +++ b/src/OpenTK/Platform/X11/X11GLNative.cs @@ -26,9 +26,7 @@ using System; using System.ComponentModel; using System.Diagnostics; -#if !MINIMAL using System.Drawing; -#endif using System.Reflection; using System.Runtime.InteropServices; using System.Text;