fixed building with sdl 2.0.4

This commit is contained in:
oy 2016-07-05 17:13:31 +02:00
parent a2935faae3
commit 0c8b327e3a
4 changed files with 12 additions and 6 deletions

View file

@ -1 +1 @@
1.2.15 2.0.4

View file

@ -35,7 +35,9 @@
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#include <intrin.h> #include <intrin.h>
#define WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h> #include <windows.h>
inline unsigned atomic_inc(volatile unsigned *pValue) inline unsigned atomic_inc(volatile unsigned *pValue)

View file

@ -14,7 +14,12 @@
#if defined(CONF_FAMILY_WINDOWS) #if defined(CONF_FAMILY_WINDOWS)
PFNGLTEXIMAGE3DPROC glTexImage3D; PFNGLTEXIMAGE3DPROC glTexImage3DInternal;
GLAPI void GLAPIENTRY glTexImage3D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
{
glTexImage3DInternal(target, level, internalFormat, width, height, depth, border, format, type, pixels);
}
#endif #endif
// ------------ CGraphicsBackend_Threaded // ------------ CGraphicsBackend_Threaded
@ -730,8 +735,8 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
} }
#if defined(CONF_FAMILY_WINDOWS) #if defined(CONF_FAMILY_WINDOWS)
glTexImage3D = (PFNGLTEXIMAGE3DPROC) wglGetProcAddress("glTexImage3D"); glTexImage3DInternal = (PFNGLTEXIMAGE3DPROC) wglGetProcAddress("glTexImage3D");
if(glTexImage3D == 0) if(glTexImage3DInternal == 0)
{ {
dbg_msg("gfx", "glTexImage3D not supported"); dbg_msg("gfx", "glTexImage3D not supported");
return -1; return -1;

View file

@ -259,7 +259,6 @@ void CGameClient::OnInit()
Client()->SnapSetStaticsize(i, m_NetObjHandler.GetObjSize(i)); Client()->SnapSetStaticsize(i, m_NetObjHandler.GetObjSize(i));
// load default font // load default font
static CFont *pDefaultFont = 0;
char aFontName[256]; char aFontName[256];
str_format(aFontName, sizeof(aFontName), "fonts/%s", g_Config.m_ClFontfile); str_format(aFontName, sizeof(aFontName), "fonts/%s", g_Config.m_ClFontfile);
char aFilename[512]; char aFilename[512];