Make ogl_init_load_library static

This commit is contained in:
Kp 2013-06-22 21:36:28 +00:00
parent ee2273a77b
commit 853713190d
3 changed files with 6 additions and 10 deletions

View file

@ -1306,16 +1306,13 @@ void *dll_GetSymbol(void *dllhandle,const char *symname)
void OpenGL_SetFuncsToNull(void);
extern char *OglLibPath;
#ifndef DECLARE_VARS
// pass true to load the library
// pass false to unload it
bool OpenGL_LoadLibrary(bool load);//load=true removed because not c++
bool OpenGL_LoadLibrary(bool load, const char *OglLibPath);//load=true removed because not c++
#else
void *OpenGLModuleHandle=NULL;
//char *OglLibPath="opengl32.dll";
bool OpenGL_LoadLibrary(bool load)
bool OpenGL_LoadLibrary(bool load, const char *OglLibPath)
{
if(load && OpenGLModuleHandle)
return true;

View file

@ -13,7 +13,6 @@
#ifdef _WIN32
#include "loadgl.h"
int ogl_init_load_library(void);
#else
# define GL_GLEXT_LEGACY
# if defined(__APPLE__) && defined(__MACH__)

View file

@ -675,15 +675,15 @@ int ogl_atotexfilti(char *a,int min)
}
#ifdef _WIN32
char *OglLibPath="opengl32.dll";
static const char OglLibPath[]="opengl32.dll";
int ogl_rt_loaded=0;
int ogl_init_load_library(void)
static int ogl_rt_loaded=0;
static int ogl_init_load_library(void)
{
int retcode=0;
if (!ogl_rt_loaded)
{
retcode = OpenGL_LoadLibrary(true);
retcode = OpenGL_LoadLibrary(true, OglLibPath);
if(retcode)
{
if(!glEnd)