Fix build in Visual Studio (2013)
Tested with Visual Studio 2013.
This commit is contained in:
parent
6380a93cec
commit
c375d27daa
22 changed files with 58 additions and 10 deletions
|
@ -19,6 +19,7 @@
|
|||
** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "crossplatform.h"
|
||||
#include "alstream.h"
|
||||
|
||||
#include "sharedstate.h"
|
||||
|
|
7
src/crossplatform.h
Normal file
7
src/crossplatform.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
|
||||
#include <direct.h>
|
||||
|
||||
#define chdir _chdir
|
||||
#endif
|
|
@ -19,6 +19,7 @@
|
|||
** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "crossplatform.h"
|
||||
#include "eventthread.h"
|
||||
|
||||
#include <SDL_events.h>
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
#ifndef EXCEPTION_H
|
||||
#define EXCEPTION_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "crossplatform.h"
|
||||
#include "filesystem.h"
|
||||
|
||||
#include "rgssad.h"
|
||||
|
|
|
@ -43,7 +43,9 @@
|
|||
#include <SDL_image.h>
|
||||
|
||||
#include <time.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "crossplatform.h"
|
||||
#include "keybindings.h"
|
||||
|
||||
#include "config.h"
|
||||
|
|
|
@ -26,11 +26,14 @@
|
|||
#include <SDL_ttf.h>
|
||||
#include <SDL_sound.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
|
||||
#include "crossplatform.h"
|
||||
#include "sharedstate.h"
|
||||
#include "eventthread.h"
|
||||
#include "gl-debug.h"
|
||||
|
@ -357,4 +360,4 @@ int main(int argc, char *argv[])
|
|||
SDL_Quit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -44,7 +44,11 @@ int __sdlThreadFun(void *obj)
|
|||
template<class C, void (C::*func)()>
|
||||
SDL_Thread *createSDLThread(C *obj, const std::string &name = std::string())
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
return SDL_CreateThread((__sdlThreadFun<C, func>), name.c_str(), obj);
|
||||
#else
|
||||
return SDL_CreateThread(__sdlThreadFun<C, func>, name.c_str(), obj);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* On Android, SDL_RWFromFile always opens files from inside
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "crossplatform.h"
|
||||
#include "settingsmenu.h"
|
||||
|
||||
#include <SDL_video.h>
|
||||
|
|
|
@ -38,7 +38,9 @@
|
|||
#include "exception.h"
|
||||
#include "sharedmidistate.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "crossplatform.h"
|
||||
#include "soundemitter.h"
|
||||
|
||||
#include "sharedstate.h"
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <algorithm>
|
||||
#endif
|
||||
#include "aldatasource.h"
|
||||
#include "exception.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue