1
0
Fork 0
forked from len0rd/rockbox

sdl: Fixes for the SDL apps, so they support building simulator on Windows

Change-Id: I277d391482a80e5bf9dd8049cd3b78c5cae7205e
This commit is contained in:
Vencislav Atanasov 2019-07-28 21:02:11 +03:00 committed by Franklin Wei
parent 349e111c81
commit 722ddcf6ba
6 changed files with 15 additions and 0 deletions

View file

@ -30,6 +30,10 @@
#include "plugin.h" #include "plugin.h"
#include "lib/pluginlib_exit.h" #include "lib/pluginlib_exit.h"
#ifdef _WIN32
#define __int64 long long
#endif
#include <setjmp.h> #include <setjmp.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdint.h> #include <stdint.h>

View file

@ -30,6 +30,7 @@
#if defined(ROCKBOX) #if defined(ROCKBOX)
#undef __ROCKBOX__ #undef __ROCKBOX__
#undef __LINUX__ /* maybe sim */ #undef __LINUX__ /* maybe sim */
#undef __WIN32__ /* maybe sim */
#define __ROCKBOX__ 1 #define __ROCKBOX__ 1
#else #else
#error This SDL supports Rockbox only! #error This SDL supports Rockbox only!

View file

@ -42,6 +42,7 @@ void setGameDir(char* gameDir);
int32_t TCkopen4load(const char *filename, int32_t readfromGRP); int32_t TCkopen4load(const char *filename, int32_t readfromGRP);
#define filelength rb_filelength
int32_t filelength(int32_t fd); int32_t filelength(int32_t fd);
#endif #endif

View file

@ -12,6 +12,11 @@
#include "SDL.h" #include "SDL.h"
#define open rb->open #define open rb->open
#define strlwr duke_strlwr
#define strupr duke_strupr
#define itoa duke_itoa
#define ltoa duke_ltoa
#define ultoa duke_ultoa
void FixFilePath(char *filename); void FixFilePath(char *filename);
int FindDistance3D(int ix, int iy, int iz); int FindDistance3D(int ix, int iy, int iz);

View file

@ -17,6 +17,8 @@
#define read(a, b, c) rb->read((a), (b), (c)) #define read(a, b, c) rb->read((a), (b), (c))
#define write(a, b, c) rb->write((a), (b), (c)) #define write(a, b, c) rb->write((a), (b), (c))
#define close(a) rb->close(a) #define close(a) rb->close(a)
#define itoa wolf3d_itoa
#define ltoa wolf3d_ltoa
#if !defined O_BINARY #if !defined O_BINARY
# define O_BINARY 0 # define O_BINARY 0

View file

@ -21,6 +21,8 @@
*/ */
#include "SDL_config.h" #include "SDL_config.h"
#undef WIN32
/* The high-level video driver subsystem */ /* The high-level video driver subsystem */
#include "SDL.h" #include "SDL.h"