diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 76d329769..e59e884c8 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -710,13 +710,13 @@ constexpr Int CursorMap[] { GLFW_ARROW_CURSOR, GLFW_IBEAM_CURSOR, GLFW_CROSSHAIR_CURSOR, - #if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 304 + #ifdef GLFW_RESIZE_NWSE_CURSOR GLFW_RESIZE_NWSE_CURSOR, GLFW_RESIZE_NESW_CURSOR, #endif GLFW_HRESIZE_CURSOR, GLFW_VRESIZE_CURSOR, - #if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 304 + #ifdef GLFW_RESIZE_NWSE_CURSOR GLFW_RESIZE_ALL_CURSOR, GLFW_NOT_ALLOWED_CURSOR, #endif diff --git a/src/Magnum/Platform/GlfwApplication.h b/src/Magnum/Platform/GlfwApplication.h index cd525df6d..3474f9efb 100644 --- a/src/Magnum/Platform/GlfwApplication.h +++ b/src/Magnum/Platform/GlfwApplication.h @@ -562,7 +562,11 @@ class GlfwApplication { TextInput, /**< Text input */ Crosshair, /**< Crosshair */ - #if defined(DOXYGEN_GENERATING_OUTPUT) || GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 304 + /* Checking for GLFW_RESIZE_NWSE_CURSOR being defined instead of a + version check because older Git clones have version set to 3.4 + but don't contain those defines. All new cursors were added in + the same commit, so it's okay to test for just one define. */ + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(GLFW_RESIZE_NWSE_CURSOR) /** * Double arrow pointing northwest and southeast * @note Available since GLFW 3.4. @@ -579,7 +583,7 @@ class GlfwApplication { ResizeWE, /**< Double arrow pointing west and east */ ResizeNS, /**< Double arrow pointing north and south */ - #if defined(DOXYGEN_GENERATING_OUTPUT) || GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 304 + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(GLFW_RESIZE_NWSE_CURSOR) /** * Four pointed arrow pointing north, south, east, and west * @note Available since GLFW 3.4.