diff --git a/src/input.c b/src/input.c index 0ad3c1b8..ec894a27 100644 --- a/src/input.c +++ b/src/input.c @@ -351,10 +351,8 @@ GLFWAPI int glfwGetKey(GLFWwindow handle, int key) return GLFW_RELEASE; } - // Is it a valid key? if (key < 0 || key > GLFW_KEY_LAST) { - // TODO: Decide whether key is a value or enum _glfwSetError(GLFW_INVALID_ENUM, "glfwGetKey: The specified key is invalid"); return GLFW_RELEASE; @@ -385,7 +383,6 @@ GLFWAPI int glfwGetMouseButton(GLFWwindow handle, int button) return GLFW_RELEASE; } - // Is it a valid mouse button? if (button < 0 || button > GLFW_MOUSE_BUTTON_LAST) { _glfwSetError(GLFW_INVALID_ENUM, @@ -418,7 +415,6 @@ GLFWAPI void glfwGetMousePos(GLFWwindow handle, int* xpos, int* ypos) return; } - // Return mouse position if (xpos != NULL) *xpos = window->cursorPosX; @@ -547,7 +543,6 @@ GLFWAPI void glfwSetMousePosCallback(GLFWmouseposfun cbfun) return; } - // Set callback function _glfwLibrary.mousePosCallback = cbfun; // Call the callback function to let the application know the current @@ -574,7 +569,6 @@ GLFWAPI void glfwSetScrollCallback(GLFWscrollfun cbfun) return; } - // Set callback function _glfwLibrary.scrollCallback = cbfun; } diff --git a/src/window.c b/src/window.c index 433275b1..f8939e37 100644 --- a/src/window.c +++ b/src/window.c @@ -655,7 +655,6 @@ GLFWAPI void glfwRestoreWindow(GLFWwindow handle) if (!window->iconified) return; - // Restore iconified window _glfwPlatformRestoreWindow(window); if (window->mode == GLFW_FULLSCREEN) diff --git a/tests/tearing.c b/tests/tearing.c index 4917ca68..1eab454e 100644 --- a/tests/tearing.c +++ b/tests/tearing.c @@ -69,7 +69,7 @@ int main(void) exit(EXIT_FAILURE); } - window = glfwOpenWindow(0, 0, GLFW_WINDOWED, "Tearing Detector", NULL); + window = glfwOpenWindow(0, 0, GLFW_WINDOWED, "", NULL); if (!window) { glfwTerminate(); @@ -78,9 +78,10 @@ int main(void) exit(EXIT_FAILURE); } + set_swap_interval(1); + glfwSetWindowSizeCallback(window_size_callback); glfwSetKeyCallback(key_callback); - set_swap_interval(1); glMatrixMode(GL_PROJECTION); glOrtho(-1.f, 1.f, -1.f, 1.f, 1.f, -1.f);