Merge 20e1a751c7 into e23fb6e1d5
This commit is contained in:
commit
c361adf576
|
|
@ -3109,7 +3109,6 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
||||||
lastKeyPressed = keycode;
|
lastKeyPressed = keycode;
|
||||||
}
|
}
|
||||||
else currentKeyState[keycode] = 0; // Key up
|
else currentKeyState[keycode] = 0; // Key up
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (type == AINPUT_EVENT_TYPE_KEY)
|
else if (type == AINPUT_EVENT_TYPE_KEY)
|
||||||
{
|
{
|
||||||
|
|
@ -3163,6 +3162,7 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
||||||
gestureEvent.pointCount = AMotionEvent_getPointerCount(event);
|
gestureEvent.pointCount = AMotionEvent_getPointerCount(event);
|
||||||
|
|
||||||
// Only enable gestures for 1-3 touch points
|
// Only enable gestures for 1-3 touch points
|
||||||
|
// @Todo: If someone is using a gamepad and hits 1-3 buttons, then this condition will be satisfied and the system will crash
|
||||||
if ((gestureEvent.pointCount > 0) && (gestureEvent.pointCount < 4))
|
if ((gestureEvent.pointCount > 0) && (gestureEvent.pointCount < 4))
|
||||||
{
|
{
|
||||||
// Register touch points id
|
// Register touch points id
|
||||||
|
|
|
||||||
1
src/external/glfw/include/GLFW/glfw3.h
vendored
1
src/external/glfw/include/GLFW/glfw3.h
vendored
|
|
@ -480,6 +480,7 @@ extern "C" {
|
||||||
#define GLFW_KEY_RIGHT_SUPER 347
|
#define GLFW_KEY_RIGHT_SUPER 347
|
||||||
#define GLFW_KEY_MENU 348
|
#define GLFW_KEY_MENU 348
|
||||||
|
|
||||||
|
#define GLFW_KEY_FIRST 19
|
||||||
#define GLFW_KEY_LAST GLFW_KEY_MENU
|
#define GLFW_KEY_LAST GLFW_KEY_MENU
|
||||||
|
|
||||||
/*! @} */
|
/*! @} */
|
||||||
|
|
|
||||||
4
src/external/glfw/src/input.c
vendored
4
src/external/glfw/src/input.c
vendored
|
|
@ -579,7 +579,7 @@ GLFWAPI int glfwGetKeyScancode(int key)
|
||||||
{
|
{
|
||||||
_GLFW_REQUIRE_INIT_OR_RETURN(-1);
|
_GLFW_REQUIRE_INIT_OR_RETURN(-1);
|
||||||
|
|
||||||
if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
|
if (key < GLFW_KEY_FIRST || key > GLFW_KEY_LAST)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
|
_glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
|
||||||
return GLFW_RELEASE;
|
return GLFW_RELEASE;
|
||||||
|
|
@ -595,7 +595,7 @@ GLFWAPI int glfwGetKey(GLFWwindow* handle, int key)
|
||||||
|
|
||||||
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE);
|
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_RELEASE);
|
||||||
|
|
||||||
if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
|
if (key < GLFW_KEY_FIRST || key > GLFW_KEY_LAST)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
|
_glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
|
||||||
return GLFW_RELEASE;
|
return GLFW_RELEASE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user