VS 2015 compiling fixes
note, wiki guide still doesn't work unless you also have vs2013 installed
This commit is contained in:
parent
5370f07bf0
commit
9e33906858
1
.gitignore
vendored
1
.gitignore
vendored
@ -46,6 +46,7 @@ Makefile.me
|
|||||||
*.lastbuildstate
|
*.lastbuildstate
|
||||||
*.unsuccessfulbuild
|
*.unsuccessfulbuild
|
||||||
*.pdb
|
*.pdb
|
||||||
|
*.db
|
||||||
*.sublime-*
|
*.sublime-*
|
||||||
*.project
|
*.project
|
||||||
*.cproject
|
*.cproject
|
||||||
|
@ -3,15 +3,11 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#ifdef SDL_INC
|
|
||||||
#include "SDL/SDL.h"
|
|
||||||
#else
|
|
||||||
#include "SDL.h"
|
|
||||||
#endif
|
|
||||||
#ifdef WIN
|
#ifdef WIN
|
||||||
#define _WIN32_WINNT 0x0501 //Necessary for some macros and functions, tells windows.h to include functions only available in Windows XP or later
|
#define _WIN32_WINNT 0x0501 //Necessary for some macros and functions, tells windows.h to include functions only available in Windows XP or later
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include "SDLCompat.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -54,13 +50,6 @@ extern "C" {
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#if defined(WIN) || defined(LIN)
|
|
||||||
#ifdef SDL_INC
|
|
||||||
#include <SDL/SDL_syswm.h>
|
|
||||||
#else
|
|
||||||
#include <SDL_syswm.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#if defined(USE_SDL) && defined(LIN) && defined(SDL_VIDEO_DRIVER_X11)
|
#if defined(USE_SDL) && defined(LIN) && defined(SDL_VIDEO_DRIVER_X11)
|
||||||
SDL_SysWMinfo sdl_wminfo;
|
SDL_SysWMinfo sdl_wminfo;
|
||||||
Atom XA_CLIPBOARD, XA_TARGETS, XA_UTF8_STRING;
|
Atom XA_CLIPBOARD, XA_TARGETS, XA_UTF8_STRING;
|
||||||
|
11
src/SDLCompat.cpp
Normal file
11
src/SDLCompat.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#if defined(USE_SDL) && defined(_MSC_VER) && (_MSC_VER >= 1900)
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
|
FILE _iob[] = { *stdin, *stdout, *stderr };
|
||||||
|
extern "C" FILE * __cdecl __iob_func(void)
|
||||||
|
{
|
||||||
|
return _iob;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
17
src/SDLCompat.h
Normal file
17
src/SDLCompat.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifdef USE_SDL
|
||||||
|
|
||||||
|
#ifdef SDL_INC
|
||||||
|
#include "SDL/SDL.h"
|
||||||
|
#else
|
||||||
|
#include "SDL.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(WIN) || defined(LIN)
|
||||||
|
#ifdef SDL_INC
|
||||||
|
#include <SDL/SDL_syswm.h>
|
||||||
|
#else
|
||||||
|
#include <SDL_syswm.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif //USE_SDL
|
@ -5,11 +5,7 @@
|
|||||||
Feel free to customize this file to suit your needs
|
Feel free to customize this file to suit your needs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef SDL_INC
|
#include "SDLCompat.h"
|
||||||
#include "SDL/SDL.h"
|
|
||||||
#else
|
|
||||||
#include "SDL.h"
|
|
||||||
#endif
|
|
||||||
#include "SDLMain.h"
|
#include "SDLMain.h"
|
||||||
#include <sys/param.h> /* for MAXPATHLEN */
|
#include <sys/param.h> /* for MAXPATHLEN */
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
#define TH_ENTRY_POINT
|
#define TH_ENTRY_POINT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// fix 'timespec' error in VS 2015
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
|
||||||
|
#define _TIMESPEC_DEFINED 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#undef GetUserName
|
#undef GetUserName
|
||||||
|
|
||||||
|
@ -5,13 +5,7 @@
|
|||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_SDL
|
#include "SDLCompat.h"
|
||||||
#ifdef SDL_INC
|
|
||||||
#include "SDL/SDL.h"
|
|
||||||
#else
|
|
||||||
#include "SDL.h"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "OptionsView.h"
|
#include "OptionsView.h"
|
||||||
#include "Format.h"
|
#include "Format.h"
|
||||||
|
Reference in New Issue
Block a user