Fix compilation with VC++2015

pull/421/head
Hleb Valoshka 2019-09-29 21:30:25 +03:00
parent 55684d195a
commit ae31662a96
6 changed files with 16 additions and 2 deletions

View File

@ -13,7 +13,9 @@
#ifdef _MSC_VER
#define BROKEN_FRIEND_TEMPLATES
#if _MSC_VER < 1700
#define snprintf _snprintf
#endif
#if _MSC_VER >= 1000
// Make VC shut up about long variable names from templates

View File

@ -12,6 +12,7 @@
#include "glext.h"
#include "shadermanager.h"
#include <cmath>
#include <algorithm> // for min & max
#include <iostream>
#include <fstream>
#include <sstream>

View File

@ -19,6 +19,7 @@
#endif /* ! TARGET_OS_MAC */
#endif /* ! _WIN32 */
#include <algorithm> // for min & max
#include <libintl.h>
#include <celutil/debug.h>
#include <celmath/mathlib.h>

View File

@ -1859,7 +1859,7 @@ bool SetDCPixelFormat(HDC hDC)
PFD_SUPPORT_OPENGL | // Support OpenGL calls in window
PFD_DOUBLEBUFFER, // Double buffered mode
PFD_TYPE_RGBA, // RGBA Color mode
GetDeviceCaps(hDC, BITSPIXEL),// Want the display bit depth
(BYTE)GetDeviceCaps(hDC, BITSPIXEL),// Want the display bit depth
0,0,0,0,0,0, // Not used to select mode
0,0, // Not used to select mode
0,0,0,0,0, // Not used to select mode

View File

@ -32,12 +32,22 @@ lpfnSetLayeredWindowAttributes winSetLayeredWindowAttributes = NULL;
lpfnUpdateLayeredWindow winUpdateLayeredWindow = NULL;
#define WS_EX_LAYERED 0x00080000
#ifndef LWA_COLORKEY
#define LWA_COLORKEY 1
#endif
#ifndef LWA_ALPHA
#define LWA_ALPHA 2
#endif
#ifndef ULW_COLORKEY
#define ULW_COLORKEY 1
#endif
#ifndef ULW_ALPHA
#define ULW_ALPHA 2
#endif
#ifndef ULW_OPAQUE
#define ULW_OPAQUE 4
#endif
static LRESULT CALLBACK SplashWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

View File

@ -14,7 +14,7 @@
#include "formatnum.h"
// HACK: MS Visual C++ has _snprintf declared in stdio.h but not snprintf
#ifdef _WIN32
#if defined(_MSC_VER) && _MSC_VER < 1700
#define snprintf _snprintf
#endif