mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +00:00
Replaced GLFWGLOBAL and _init_c_ with extern.
This commit is contained in:
parent
1839c1c73d
commit
5d52ad1548
18
src/init.c
18
src/init.c
@ -28,13 +28,29 @@
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#define _init_c_
|
||||
#include "internal.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Platform independent global state shared between compilation units
|
||||
//========================================================================
|
||||
|
||||
// Flag indicating whether GLFW has been initialized
|
||||
GLboolean _glfwInitialized = GL_FALSE;
|
||||
|
||||
// All global data protected by _glfwInitialized
|
||||
// This data should only be touched after a call to glfwInit that has
|
||||
// not been followed by a call to glfwTerminate
|
||||
_GLFWlibrary _glfwLibrary;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW public API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -31,17 +31,6 @@
|
||||
#ifndef _internal_h_
|
||||
#define _internal_h_
|
||||
|
||||
//========================================================================
|
||||
// GLFWGLOBAL is a macro that places all global variables in the init.c
|
||||
// module (all other modules reference global variables as 'extern')
|
||||
//========================================================================
|
||||
|
||||
#if defined(_init_c_)
|
||||
#define GLFWGLOBAL
|
||||
#else
|
||||
#define GLFWGLOBAL extern
|
||||
#endif
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Input handling definitions
|
||||
@ -245,17 +234,15 @@ struct _GLFWlibrary
|
||||
|
||||
|
||||
//========================================================================
|
||||
// System independent global variables (GLFW internals)
|
||||
// Platform independent global state shared between compilation units
|
||||
// These are exported from init.c
|
||||
//========================================================================
|
||||
|
||||
// Flag indicating if GLFW has been initialized
|
||||
#if defined(_init_c_)
|
||||
GLboolean _glfwInitialized = GL_FALSE;
|
||||
#else
|
||||
GLFWGLOBAL GLboolean _glfwInitialized;
|
||||
#endif
|
||||
extern GLboolean _glfwInitialized;
|
||||
|
||||
GLFWGLOBAL _GLFWlibrary _glfwLibrary;
|
||||
// All global data protected by _glfwInitialized
|
||||
extern _GLFWlibrary _glfwLibrary;
|
||||
|
||||
|
||||
//========================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user