mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Formatting.
This commit is contained in:
parent
ce288a8939
commit
5a05da441d
|
@ -157,7 +157,7 @@ static void setKeyRepeat(_GLFWwindow* window, int enabled)
|
|||
|
||||
void _glfwInputKey(_GLFWwindow* window, int key, int action)
|
||||
{
|
||||
GLboolean keyrepeat = GL_FALSE;
|
||||
GLboolean repeated = GL_FALSE;
|
||||
|
||||
if (key < 0 || key > GLFW_KEY_LAST)
|
||||
return;
|
||||
|
@ -171,12 +171,12 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action)
|
|||
window->key[key] = GLFW_STICK;
|
||||
else
|
||||
{
|
||||
keyrepeat = (window->key[key] == GLFW_PRESS) && (action == GLFW_PRESS);
|
||||
repeated = (window->key[key] == GLFW_PRESS) && (action == GLFW_PRESS);
|
||||
window->key[key] = (char) action;
|
||||
}
|
||||
|
||||
// Call user callback function
|
||||
if (_glfwLibrary.keyCallback && (window->keyRepeat || !keyrepeat))
|
||||
if (_glfwLibrary.keyCallback && (window->keyRepeat || !repeated))
|
||||
_glfwLibrary.keyCallback(window, key, action);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user