mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-08 10:10:00 +00:00
Added SDL_GL_GetCurrentContext method and TouchMouseID constant.
SDL_GL_GetCurrentContext will allow us to replace the weird implementation in Sdl2Factory.CreateGetCurrentGraphicsContext() and the latter to disable mouse emulation if we wish to. Conflicts: Source/OpenTK/Platform/SDL2/Sdl2.cs
This commit is contained in:
parent
eba7e59253
commit
29fe1052de
|
@ -23,6 +23,9 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
@ -294,6 +297,9 @@ namespace OpenTK.Platform.SDL2
|
|||
[DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GL_GetAttribute", ExactSpelling = true)]
|
||||
public static extern int GetAttribute(ContextAttribute attr, out int value);
|
||||
|
||||
[DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GL_GetCurrentContext", ExactSpelling = true)]
|
||||
public static extern IntPtr GetCurrentContext();
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_GL_GetDrawableSize", ExactSpelling = true)]
|
||||
public static extern void GetDrawableSize(IntPtr window, out int w, out int h);
|
||||
|
@ -1170,6 +1176,25 @@ namespace OpenTK.Platform.SDL2
|
|||
public uint Which;
|
||||
public int X;
|
||||
public int Y;
|
||||
|
||||
public enum EventType : uint
|
||||
{
|
||||
/* Touch events */
|
||||
FingerDown = 0x700,
|
||||
FingerUp,
|
||||
FingerMotion,
|
||||
|
||||
/* Gesture events */
|
||||
DollarGesture = 0x800,
|
||||
DollarRecord,
|
||||
MultiGesture,
|
||||
}
|
||||
|
||||
public const uint TouchMouseID = 0xffffffff;
|
||||
|
||||
public static class GL
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
struct Rect
|
||||
|
|
Loading…
Reference in a new issue