glfw - extra key support for GAMEPAD, minimum key is now 18
This commit is contained in:
parent
c687dfe572
commit
54920e3e85
6
src/external/glfw/CMakeLists.txt
vendored
6
src/external/glfw/CMakeLists.txt
vendored
|
|
@ -359,15 +359,15 @@ configure_file(src/glfw3.pc.in src/glfw3.pc @ONLY)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
if (GLFW_BUILD_EXAMPLES)
|
if (GLFW_BUILD_EXAMPLES)
|
||||||
add_subdirectory(examples)
|
#add_subdirectory(examples)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (GLFW_BUILD_TESTS)
|
if (GLFW_BUILD_TESTS)
|
||||||
add_subdirectory(tests)
|
#add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
|
if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
|
||||||
add_subdirectory(docs)
|
#add_subdirectory(docs)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
|
||||||
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