mirror of
https://github.com/glfw/glfw.git
synced 2024-11-23 02:25:10 +00:00
Merge branch 'master' into EGL
This commit is contained in:
commit
0b25bba5b5
@ -288,6 +288,16 @@ endif()
|
|||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
set(GLFW_LIBRARIES ${glfw_LIBRARIES} CACHE STRING "Dependencies of GLFW")
|
set(GLFW_LIBRARIES ${glfw_LIBRARIES} CACHE STRING "Dependencies of GLFW")
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# Choose library output name
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
if (BUILD_SHARED_LIBS AND UNIX)
|
||||||
|
# On Unix-like systems, shared libraries can use the soname system.
|
||||||
|
set(GLFW_LIB_NAME glfw)
|
||||||
|
else()
|
||||||
|
set(GLFW_LIB_NAME glfw3)
|
||||||
|
endif()
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Add subdirectories
|
# Add subdirectories
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
@ -324,10 +334,10 @@ install(FILES COPYING.txt readme.html
|
|||||||
# Create and install pkg-config file on supported platforms
|
# Create and install pkg-config file on supported platforms
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
if (_GLFW_X11_GLX OR _GLFW_COCOA_NSGL)
|
if (_GLFW_X11_GLX OR _GLFW_COCOA_NSGL)
|
||||||
configure_file(${GLFW_SOURCE_DIR}/src/libglfw.pc.in
|
configure_file(${GLFW_SOURCE_DIR}/src/libglfw3.pc.in
|
||||||
${GLFW_BINARY_DIR}/src/libglfw.pc @ONLY)
|
${GLFW_BINARY_DIR}/src/libglfw3.pc @ONLY)
|
||||||
|
|
||||||
install(FILES ${GLFW_BINARY_DIR}/src/libglfw.pc
|
install(FILES ${GLFW_BINARY_DIR}/src/libglfw3.pc
|
||||||
DESTINATION lib/pkgconfig)
|
DESTINATION lib/pkgconfig)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -849,6 +849,9 @@ their skills. Special thanks go out to:</p>
|
|||||||
<li>Keith Bauer, for his invaluable help with porting and maintaining GLFW on
|
<li>Keith Bauer, for his invaluable help with porting and maintaining GLFW on
|
||||||
Mac OS X, and for his many ideas</li>
|
Mac OS X, and for his many ideas</li>
|
||||||
|
|
||||||
|
<li>John Bartholomew, for adding proper version number and soname to the
|
||||||
|
shared library build</li>
|
||||||
|
|
||||||
<li>Lambert Clara, for a bug fix for the modes test</li>
|
<li>Lambert Clara, for a bug fix for the modes test</li>
|
||||||
|
|
||||||
<li>Jarrod Davis, for the Delphi port of GLFW</li>
|
<li>Jarrod Davis, for the Delphi port of GLFW</li>
|
||||||
|
@ -36,8 +36,14 @@ elseif (_GLFW_X11_EGL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
||||||
|
set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}")
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
|
# Include version information in the output
|
||||||
|
set_target_properties(glfw PROPERTIES VERSION ${GLFW_VERSION})
|
||||||
|
if (UNIX)
|
||||||
|
set_target_properties(glfw PROPERTIES SOVERSION ${GLFW_VERSION_MAJOR})
|
||||||
|
endif()
|
||||||
|
|
||||||
if (_GLFW_WIN32_WGL)
|
if (_GLFW_WIN32_WGL)
|
||||||
# The GLFW DLL needs a special compile-time macro and import library name
|
# The GLFW DLL needs a special compile-time macro and import library name
|
||||||
|
@ -1170,7 +1170,7 @@ void _glfwPlatformSetCursorPos(_GLFWwindow* window, int x, int y)
|
|||||||
{
|
{
|
||||||
if (window->mode == GLFW_FULLSCREEN)
|
if (window->mode == GLFW_FULLSCREEN)
|
||||||
{
|
{
|
||||||
CGPoint globalPoint = CGMakePoint(x, y);
|
CGPoint globalPoint = CGPointMake(x, y);
|
||||||
CGDisplayMoveCursorToPoint(CGMainDisplayID(), globalPoint);
|
CGDisplayMoveCursorToPoint(CGMainDisplayID(), globalPoint);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -8,6 +8,6 @@ Description: A portable library for OpenGL, window and input
|
|||||||
Version: @GLFW_VERSION_FULL@
|
Version: @GLFW_VERSION_FULL@
|
||||||
URL: http://www.glfw.org/
|
URL: http://www.glfw.org/
|
||||||
Requires.private: @GLFW_PKG_DEPS@
|
Requires.private: @GLFW_PKG_DEPS@
|
||||||
Libs: -L${libdir} -lglfw
|
Libs: -L${libdir} -l@GLFW_LIB_NAME@
|
||||||
Libs.private: @GLFW_PKG_LIBS@
|
Libs.private: @GLFW_PKG_LIBS@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
@ -1139,20 +1139,14 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
|||||||
|
|
||||||
void _glfwPlatformRefreshWindowParams(void)
|
void _glfwPlatformRefreshWindowParams(void)
|
||||||
{
|
{
|
||||||
#if defined(_GLFW_HAS_XRANDR)
|
|
||||||
XRRScreenConfiguration* sc;
|
|
||||||
#endif /*_GLFW_HAS_XRANDR*/
|
|
||||||
#if defined(_GLFW_HAS_XF86VIDMODE)
|
|
||||||
XF86VidModeModeLine modeline;
|
|
||||||
int dotclock;
|
|
||||||
float pixels_per_second, pixels_per_frame;
|
|
||||||
#endif /*_GLFW_HAS_XF86VIDMODE*/
|
|
||||||
_GLFWwindow* window = _glfwLibrary.currentWindow;
|
_GLFWwindow* window = _glfwLibrary.currentWindow;
|
||||||
|
|
||||||
// Retrieve refresh rate if possible
|
// Retrieve refresh rate if possible
|
||||||
if (_glfwLibrary.X11.RandR.available)
|
if (_glfwLibrary.X11.RandR.available)
|
||||||
{
|
{
|
||||||
#if defined(_GLFW_HAS_XRANDR)
|
#if defined(_GLFW_HAS_XRANDR)
|
||||||
|
XRRScreenConfiguration* sc;
|
||||||
|
|
||||||
sc = XRRGetScreenInfo(_glfwLibrary.X11.display, _glfwLibrary.X11.root);
|
sc = XRRGetScreenInfo(_glfwLibrary.X11.display, _glfwLibrary.X11.root);
|
||||||
window->refreshRate = XRRConfigCurrentRate(sc);
|
window->refreshRate = XRRConfigCurrentRate(sc);
|
||||||
XRRFreeScreenConfigInfo(sc);
|
XRRFreeScreenConfigInfo(sc);
|
||||||
@ -1161,6 +1155,10 @@ void _glfwPlatformRefreshWindowParams(void)
|
|||||||
else if (_glfwLibrary.X11.VidMode.available)
|
else if (_glfwLibrary.X11.VidMode.available)
|
||||||
{
|
{
|
||||||
#if defined(_GLFW_HAS_XF86VIDMODE)
|
#if defined(_GLFW_HAS_XF86VIDMODE)
|
||||||
|
XF86VidModeModeLine modeline;
|
||||||
|
int dotclock;
|
||||||
|
float pixels_per_second, pixels_per_frame;
|
||||||
|
|
||||||
// Use the XF86VidMode extension to get current video mode
|
// Use the XF86VidMode extension to get current video mode
|
||||||
XF86VidModeGetModeLine(_glfwLibrary.X11.display,
|
XF86VidModeGetModeLine(_glfwLibrary.X11.display,
|
||||||
_glfwLibrary.X11.screen,
|
_glfwLibrary.X11.screen,
|
||||||
|
Loading…
Reference in New Issue
Block a user