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)
#include <intrin.h>
#define WIN32_LEAN_AND_MEAN
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
inline unsigned atomic_inc(volatile unsigned *pValue)

View file

@ -14,7 +14,12 @@
#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
// ------------ CGraphicsBackend_Threaded
@ -730,8 +735,8 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
}
#if defined(CONF_FAMILY_WINDOWS)
glTexImage3D = (PFNGLTEXIMAGE3DPROC) wglGetProcAddress("glTexImage3D");
if(glTexImage3D == 0)
glTexImage3DInternal = (PFNGLTEXIMAGE3DPROC) wglGetProcAddress("glTexImage3D");
if(glTexImage3DInternal == 0)
{
dbg_msg("gfx", "glTexImage3D not supported");
return -1;

View file

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