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
|
||||
*.unsuccessfulbuild
|
||||
*.pdb
|
||||
*.db
|
||||
*.sublime-*
|
||||
*.project
|
||||
*.cproject
|
||||
|
@ -3,15 +3,11 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <ctime>
|
||||
#ifdef SDL_INC
|
||||
#include "SDL/SDL.h"
|
||||
#else
|
||||
#include "SDL.h"
|
||||
#endif
|
||||
#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
|
||||
#include <direct.h>
|
||||
#endif
|
||||
#include "SDLCompat.h"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@ -54,13 +50,6 @@ extern "C" {
|
||||
|
||||
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)
|
||||
SDL_SysWMinfo sdl_wminfo;
|
||||
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
|
||||
*/
|
||||
|
||||
#ifdef SDL_INC
|
||||
#include "SDL/SDL.h"
|
||||
#else
|
||||
#include "SDL.h"
|
||||
#endif
|
||||
#include "SDLCompat.h"
|
||||
#include "SDLMain.h"
|
||||
#include <sys/param.h> /* for MAXPATHLEN */
|
||||
#include <unistd.h>
|
||||
|
@ -8,6 +8,11 @@
|
||||
#define TH_ENTRY_POINT
|
||||
#endif
|
||||
|
||||
// fix 'timespec' error in VS 2015
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
|
||||
#define _TIMESPEC_DEFINED 1
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
#undef GetUserName
|
||||
|
||||
|
@ -5,13 +5,7 @@
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef USE_SDL
|
||||
#ifdef SDL_INC
|
||||
#include "SDL/SDL.h"
|
||||
#else
|
||||
#include "SDL.h"
|
||||
#endif
|
||||
#endif
|
||||
#include "SDLCompat.h"
|
||||
|
||||
#include "OptionsView.h"
|
||||
#include "Format.h"
|
||||
|
Reference in New Issue
Block a user