* fix compilation on non-Windows systems

This commit is contained in:
alexey.lysiuk 2013-12-07 12:19:35 +02:00
parent d46315c44b
commit 4b24489393
1 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,9 @@
#include "gl/system/gl_cvars.h" #include "gl/system/gl_cvars.h"
#if defined (__unix__) || defined (__APPLE__) #if defined (__unix__) || defined (__APPLE__)
#define PROC void*
#define LPCSTR const char*
#include <SDL.h> #include <SDL.h>
#define wglGetProcAddress(x) (*SDL_GL_GetProcAddress)(x) #define wglGetProcAddress(x) (*SDL_GL_GetProcAddress)(x)
#endif #endif
@ -62,7 +65,7 @@ int occlusion_type=0;
PROC myGetProcAddress(LPCSTR proc) PROC myGetProcAddress(LPCSTR proc)
{ {
PROC p = wglGetProcAddress(proc); PROC p = wglGetProcAddress(proc);
if (p == NULL) I_Error("Fatal: GL function '%s' not found."); if (p == NULL) I_Error("Fatal: GL function '%s' not found.", proc);
return p; return p;
} }