mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Merge branch 'master' into multi-display-support
This commit is contained in:
commit
8e89fff792
@ -287,6 +287,7 @@ version of GLFW.</p>
|
||||
<li>Changed buffer bit depth parameters of <code>glfwOpenWindow</code> to window hints</li>
|
||||
<li>Renamed <code>glfw.h</code> to <code>glfw3.h</code> to avoid conflicts with 2.x series</li>
|
||||
<li>Renamed <code>GLFW_WINDOW</code> token to <code>GLFW_WINDOWED</code></li>
|
||||
<li>Renamed <code>version</code> test to <code>glfwinfo</code></li>
|
||||
<li>Replaced ad hoc build system with CMake</li>
|
||||
<li>Replaced layout-dependent key codes with single, platform-independent set based on US layout</li>
|
||||
<li>Replaced mouse wheel interface with two-dimensional scrolling interface</li>
|
||||
@ -302,7 +303,7 @@ version of GLFW.</p>
|
||||
<li>Removed <code>GLFW_OPENED</code> window parameter</li>
|
||||
<li>Removed nonsensical key actions for Unicode character input</li>
|
||||
<li>Removed <code>GLFWCALL</code> and <code>GLFWAPIENTRY</code> macros for stdcall calling convention</li>
|
||||
<li>Bugfix: The default OpenGL version in the <code>version</code> test was set to 1.1</li>
|
||||
<li>Bugfix: The default OpenGL version in the <code>glfwinfo</code> test was set to 1.1</li>
|
||||
<li>Bugfix: The OpenGL profile and forward-compatibility window parameters were not saved after context creation</li>
|
||||
<li>Bugfix: The FSAA test did not check for the availability of <code>GL_ARB_multisample</code></li>
|
||||
<li>[Cocoa] Added support for OpenGL 3.2 core profile in 10.7 Lion and above</li>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
10
src/window.c
10
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
|
||||
//========================================================================
|
||||
|
@ -48,6 +48,7 @@ void _glfwPlatformEnableSystemKeys(_GLFWwindow* window)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Disable system keys
|
||||
//========================================================================
|
||||
|
@ -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
|
||||
//========================================================================
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user