diff --git a/readme.html b/readme.html
index 65fbf372..a028b45b 100644
--- a/readme.html
+++ b/readme.html
@@ -287,6 +287,7 @@ version of GLFW.
Changed buffer bit depth parameters of glfwOpenWindow
to window hints
Renamed glfw.h
to glfw3.h
to avoid conflicts with 2.x series
Renamed GLFW_WINDOW
token to GLFW_WINDOWED
+ Renamed version
test to glfwinfo
Replaced ad hoc build system with CMake
Replaced layout-dependent key codes with single, platform-independent set based on US layout
Replaced mouse wheel interface with two-dimensional scrolling interface
@@ -302,7 +303,7 @@ version of GLFW.
Removed GLFW_OPENED
window parameter
Removed nonsensical key actions for Unicode character input
Removed GLFWCALL
and GLFWAPIENTRY
macros for stdcall calling convention
- Bugfix: The default OpenGL version in the version
test was set to 1.1
+ Bugfix: The default OpenGL version in the glfwinfo
test was set to 1.1
Bugfix: The OpenGL profile and forward-compatibility window parameters were not saved after context creation
Bugfix: The FSAA test did not check for the availability of GL_ARB_multisample
[Cocoa] Added support for OpenGL 3.2 core profile in 10.7 Lion and above
diff --git a/src/enable.c b/src/enable.c
index 82ba940c..897f0753 100644
--- a/src/enable.c
+++ b/src/enable.c
@@ -152,6 +152,7 @@ GLFWAPI void glfwEnable(GLFWwindow window, int token)
enableKeyRepeat(window);
break;
default:
+ _glfwSetError(GLFW_INVALID_ENUM, NULL);
break;
}
}
@@ -184,6 +185,7 @@ GLFWAPI void glfwDisable(GLFWwindow window, int token)
disableKeyRepeat(window);
break;
default:
+ _glfwSetError(GLFW_INVALID_ENUM, NULL);
break;
}
}
diff --git a/src/input.c b/src/input.c
index 983a05ee..1728742d 100644
--- a/src/input.c
+++ b/src/input.c
@@ -53,7 +53,7 @@ GLFWAPI int glfwGetKey(GLFWwindow handle, int key)
if (key < 0 || key > GLFW_KEY_LAST)
{
// TODO: Decide whether key is a value or enum
- _glfwSetError(GLFW_INVALID_VALUE,
+ _glfwSetError(GLFW_INVALID_ENUM,
"glfwGetKey: The specified key is invalid");
return GLFW_RELEASE;
}
diff --git a/src/opengl.c b/src/opengl.c
index d75eee8f..f4c6984c 100644
--- a/src/opengl.c
+++ b/src/opengl.c
@@ -345,6 +345,7 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
return GL_TRUE;
}
+
//========================================================================
// Checks whether the specified context fulfils the requirements
// It blames glfwOpenWindow because that's the only caller
diff --git a/src/window.c b/src/window.c
index a39125ef..06c32b8d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -468,6 +468,7 @@ GLFWAPI void glfwOpenWindowHint(int target, int hint)
_glfwLibrary.hints.glRobustness = hint;
break;
default:
+ _glfwSetError(GLFW_INVALID_ENUM, NULL);
break;
}
}
@@ -748,12 +749,10 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
return window->glProfile;
case GLFW_OPENGL_ROBUSTNESS:
return window->glRobustness;
- default:
- _glfwSetError(GLFW_INVALID_ENUM,
- "glfwGetWindowParam: Invalid enum value for 'param' "
- "parameter");
- return 0;
}
+
+ _glfwSetError(GLFW_INVALID_ENUM, NULL);
+ return 0;
}
@@ -818,6 +817,7 @@ GLFWAPI void glfwSetWindowSizeCallback(GLFWwindowsizefun cbfun)
}
}
+
//========================================================================
// Set callback function for window close events
//========================================================================
diff --git a/src/x11_enable.c b/src/x11_enable.c
index 9b439385..49961395 100644
--- a/src/x11_enable.c
+++ b/src/x11_enable.c
@@ -48,6 +48,7 @@ void _glfwPlatformEnableSystemKeys(_GLFWwindow* window)
}
}
+
//========================================================================
// Disable system keys
//========================================================================
diff --git a/src/x11_window.c b/src/x11_window.c
index a05b121c..962da7fb 100644
--- a/src/x11_window.c
+++ b/src/x11_window.c
@@ -206,6 +206,7 @@ static GLboolean hasEWMH(_GLFWwindow* window)
return GL_TRUE;
}
+
//========================================================================
// Translates an X Window key to internal coding
//========================================================================
@@ -974,6 +975,7 @@ static void enterFullscreenMode(_GLFWwindow* window)
window->width / 2, window->height / 2);
}
+
//========================================================================
// Leave fullscreen mode
//========================================================================
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index f4c99bb2..cd57659c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -16,12 +16,12 @@ add_executable(events events.c)
add_executable(fsaa fsaa.c getopt.c)
add_executable(fsfocus fsfocus.c)
add_executable(gamma gamma.c getopt.c)
+add_executable(glfwinfo glfwinfo.c getopt.c)
add_executable(iconify iconify.c getopt.c)
add_executable(joysticks joysticks.c)
add_executable(listmodes listmodes.c)
add_executable(peter peter.c)
add_executable(reopen reopen.c)
-add_executable(version version.c getopt.c)
if(APPLE)
# Set fancy names for bundles
@@ -38,8 +38,8 @@ else()
endif(APPLE)
set(WINDOWS_BINARIES accuracy sharing tearing windows)
-set(CONSOLE_BINARIES defaults events fsaa fsfocus gamma iconify joysticks
- listmodes peter reopen version)
+set(CONSOLE_BINARIES defaults events fsaa fsfocus gamma glfwinfo iconify
+ joysticks listmodes peter reopen)
if(MSVC)
# Tell MSVC to use main instead of WinMain for Windows subsystem executables
diff --git a/tests/version.c b/tests/glfwinfo.c
similarity index 100%
rename from tests/version.c
rename to tests/glfwinfo.c