From 892d4612c4a3022abb86d0807c270624be6de4eb Mon Sep 17 00:00:00 2001 From: Apprentice-Alchemist <53486764+Apprentice-Alchemist@users.noreply.github.com> Date: Mon, 24 Jan 2022 22:24:01 +0100 Subject: [PATCH] Close #1516. Fixe an inconcistency between the C and haxe sides of the OpenGL bindings. --- project/include/ui/KeyEvent.h | 2 +- project/src/ExternalInterface.cpp | 2 +- project/src/graphics/opengl/OpenGLBindings.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project/include/ui/KeyEvent.h b/project/include/ui/KeyEvent.h index 6a3cfa66e..28e6fcc6f 100644 --- a/project/include/ui/KeyEvent.h +++ b/project/include/ui/KeyEvent.h @@ -21,7 +21,7 @@ namespace lime { struct KeyEvent { hl_type* t; - int keyCode; + double keyCode; int modifier; KeyEventType type; int windowID; diff --git a/project/src/ExternalInterface.cpp b/project/src/ExternalInterface.cpp index a664b6081..a0395e1e9 100644 --- a/project/src/ExternalInterface.cpp +++ b/project/src/ExternalInterface.cpp @@ -3947,7 +3947,7 @@ namespace lime { #define _TDROP_EVENT _OBJ (_BYTES _I32) #define _TGAMEPAD_EVENT _OBJ (_I32 _I32 _I32 _I32 _F64) #define _TJOYSTICK_EVENT _OBJ (_I32 _I32 _I32 _I32 _F64 _F64) - #define _TKEY_EVENT _OBJ (_I32 _I32 _I32 _I32) + #define _TKEY_EVENT _OBJ (_F64 _I32 _I32 _I32) #define _TMOUSE_EVENT _OBJ (_I32 _F64 _F64 _I32 _I32 _F64 _F64) #define _TRECTANGLE _OBJ (_F64 _F64 _F64 _F64) #define _TRENDER_EVENT _OBJ (_I32) diff --git a/project/src/graphics/opengl/OpenGLBindings.cpp b/project/src/graphics/opengl/OpenGLBindings.cpp index b2599f9b4..28ae4ae60 100644 --- a/project/src/graphics/opengl/OpenGLBindings.cpp +++ b/project/src/graphics/opengl/OpenGLBindings.cpp @@ -5620,7 +5620,7 @@ namespace lime { #define _TBYTES _OBJ (_I32 _BYTES) #define _TCFFIPOINTER _DYN - #define _TGLOBJECT _OBJ (_I32 _TCFFIPOINTER _OBJ (_ARR)) + #define _TGLOBJECT _OBJ (_I32 _TCFFIPOINTER _OBJ (_I32 _ARR)) DEFINE_HL_PRIM (_VOID, lime_gl_active_texture, _I32);