1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Formatting.

This commit is contained in:
Camilla Berglund 2012-02-04 00:52:13 +01:00
parent ce288a8939
commit 5a05da441d

View File

@ -157,7 +157,7 @@ static void setKeyRepeat(_GLFWwindow* window, int enabled)
void _glfwInputKey(_GLFWwindow* window, int key, int action) void _glfwInputKey(_GLFWwindow* window, int key, int action)
{ {
GLboolean keyrepeat = GL_FALSE; GLboolean repeated = GL_FALSE;
if (key < 0 || key > GLFW_KEY_LAST) if (key < 0 || key > GLFW_KEY_LAST)
return; return;
@ -171,12 +171,12 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action)
window->key[key] = GLFW_STICK; window->key[key] = GLFW_STICK;
else else
{ {
keyrepeat = (window->key[key] == GLFW_PRESS) && (action == GLFW_PRESS); repeated = (window->key[key] == GLFW_PRESS) && (action == GLFW_PRESS);
window->key[key] = (char) action; window->key[key] = (char) action;
} }
// Call user callback function // Call user callback function
if (_glfwLibrary.keyCallback && (window->keyRepeat || !keyrepeat)) if (_glfwLibrary.keyCallback && (window->keyRepeat || !repeated))
_glfwLibrary.keyCallback(window, key, action); _glfwLibrary.keyCallback(window, key, action);
} }