mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Replace hardcoded version number with macro
This commit is contained in:
parent
d00579bf60
commit
9d3a3c32d6
|
@ -33,8 +33,6 @@
|
||||||
#include "glfw_config.h"
|
#include "glfw_config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _GLFW_VERSION_NUMBER "3.2.0"
|
|
||||||
|
|
||||||
#if defined(GLFW_INCLUDE_GLCOREARB) || \
|
#if defined(GLFW_INCLUDE_GLCOREARB) || \
|
||||||
defined(GLFW_INCLUDE_ES1) || \
|
defined(GLFW_INCLUDE_ES1) || \
|
||||||
defined(GLFW_INCLUDE_ES2) || \
|
defined(GLFW_INCLUDE_ES2) || \
|
||||||
|
@ -134,6 +132,13 @@ typedef int GLFWbool;
|
||||||
// Helper macros
|
// Helper macros
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
|
// Constructs a version number string from the public header macros
|
||||||
|
#define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r
|
||||||
|
#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r)
|
||||||
|
#define _GLFW_VERSION_NUMBER _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, \
|
||||||
|
GLFW_VERSION_MINOR, \
|
||||||
|
GLFW_VERSION_REVISION)
|
||||||
|
|
||||||
// Checks for whether the library has been initialized
|
// Checks for whether the library has been initialized
|
||||||
#define _GLFW_REQUIRE_INIT() \
|
#define _GLFW_REQUIRE_INIT() \
|
||||||
if (!_glfwInitialized) \
|
if (!_glfwInitialized) \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user