summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVencislav Atanasov <user890104@freemyipod.org>2019-07-28 21:02:11 +0300
committerFranklin Wei <franklin@rockbox.org>2019-07-31 19:34:18 +0200
commit722ddcf6ba35b5b06ae42b399140056ca67ad7ed (patch)
treebebce86e0049d51239b534d228a3fef4a1292a67
parent349e111c81abd2214859f1afc4b2e96fb3a90733 (diff)
downloadrockbox-722ddcf6ba35b5b06ae42b399140056ca67ad7ed.tar.gz
rockbox-722ddcf6ba35b5b06ae42b399140056ca67ad7ed.zip
sdl: Fixes for the SDL apps, so they support building simulator on Windows
Change-Id: I277d391482a80e5bf9dd8049cd3b78c5cae7205e
-rw-r--r--apps/plugins/sdl/include/SDL_config_rockbox.h4
-rw-r--r--apps/plugins/sdl/include/SDL_platform.h1
-rw-r--r--apps/plugins/sdl/progs/duke3d/Engine/src/filesystem.h1
-rw-r--r--apps/plugins/sdl/progs/duke3d/Game/src/global.h5
-rw-r--r--apps/plugins/sdl/progs/wolf3d/wl_def.h2
-rw-r--r--apps/plugins/sdl/src/video/SDL_video.c2
6 files changed, 15 insertions, 0 deletions
diff --git a/apps/plugins/sdl/include/SDL_config_rockbox.h b/apps/plugins/sdl/include/SDL_config_rockbox.h
index 2cefc244e2..bee63c4f20 100644
--- a/apps/plugins/sdl/include/SDL_config_rockbox.h
+++ b/apps/plugins/sdl/include/SDL_config_rockbox.h
@@ -30,6 +30,10 @@
30#include "plugin.h" 30#include "plugin.h"
31#include "lib/pluginlib_exit.h" 31#include "lib/pluginlib_exit.h"
32 32
33#ifdef _WIN32
34#define __int64 long long
35#endif
36
33#include <setjmp.h> 37#include <setjmp.h>
34#include <stdarg.h> 38#include <stdarg.h>
35#include <stdint.h> 39#include <stdint.h>
diff --git a/apps/plugins/sdl/include/SDL_platform.h b/apps/plugins/sdl/include/SDL_platform.h
index 3bc6504232..9e5330c54b 100644
--- a/apps/plugins/sdl/include/SDL_platform.h
+++ b/apps/plugins/sdl/include/SDL_platform.h
@@ -30,6 +30,7 @@
30#if defined(ROCKBOX) 30#if defined(ROCKBOX)
31#undef __ROCKBOX__ 31#undef __ROCKBOX__
32#undef __LINUX__ /* maybe sim */ 32#undef __LINUX__ /* maybe sim */
33#undef __WIN32__ /* maybe sim */
33#define __ROCKBOX__ 1 34#define __ROCKBOX__ 1
34#else 35#else
35#error This SDL supports Rockbox only! 36#error This SDL supports Rockbox only!
diff --git a/apps/plugins/sdl/progs/duke3d/Engine/src/filesystem.h b/apps/plugins/sdl/progs/duke3d/Engine/src/filesystem.h
index fe172072b5..72dac7ff65 100644
--- a/apps/plugins/sdl/progs/duke3d/Engine/src/filesystem.h
+++ b/apps/plugins/sdl/progs/duke3d/Engine/src/filesystem.h
@@ -42,6 +42,7 @@ void setGameDir(char* gameDir);
42 42
43int32_t TCkopen4load(const char *filename, int32_t readfromGRP); 43int32_t TCkopen4load(const char *filename, int32_t readfromGRP);
44 44
45#define filelength rb_filelength
45int32_t filelength(int32_t fd); 46int32_t filelength(int32_t fd);
46 47
47#endif 48#endif
diff --git a/apps/plugins/sdl/progs/duke3d/Game/src/global.h b/apps/plugins/sdl/progs/duke3d/Game/src/global.h
index ab7d6eb634..a9a00002f0 100644
--- a/apps/plugins/sdl/progs/duke3d/Game/src/global.h
+++ b/apps/plugins/sdl/progs/duke3d/Game/src/global.h
@@ -12,6 +12,11 @@
12#include "SDL.h" 12#include "SDL.h"
13 13
14#define open rb->open 14#define open rb->open
15#define strlwr duke_strlwr
16#define strupr duke_strupr
17#define itoa duke_itoa
18#define ltoa duke_ltoa
19#define ultoa duke_ultoa
15 20
16void FixFilePath(char *filename); 21void FixFilePath(char *filename);
17int FindDistance3D(int ix, int iy, int iz); 22int FindDistance3D(int ix, int iy, int iz);
diff --git a/apps/plugins/sdl/progs/wolf3d/wl_def.h b/apps/plugins/sdl/progs/wolf3d/wl_def.h
index 13ec77cf70..af74a5315c 100644
--- a/apps/plugins/sdl/progs/wolf3d/wl_def.h
+++ b/apps/plugins/sdl/progs/wolf3d/wl_def.h
@@ -17,6 +17,8 @@
17#define read(a, b, c) rb->read((a), (b), (c)) 17#define read(a, b, c) rb->read((a), (b), (c))
18#define write(a, b, c) rb->write((a), (b), (c)) 18#define write(a, b, c) rb->write((a), (b), (c))
19#define close(a) rb->close(a) 19#define close(a) rb->close(a)
20#define itoa wolf3d_itoa
21#define ltoa wolf3d_ltoa
20 22
21#if !defined O_BINARY 23#if !defined O_BINARY
22# define O_BINARY 0 24# define O_BINARY 0
diff --git a/apps/plugins/sdl/src/video/SDL_video.c b/apps/plugins/sdl/src/video/SDL_video.c
index 2648d1fb3c..400d672e18 100644
--- a/apps/plugins/sdl/src/video/SDL_video.c
+++ b/apps/plugins/sdl/src/video/SDL_video.c
@@ -21,6 +21,8 @@
21*/ 21*/
22#include "SDL_config.h" 22#include "SDL_config.h"
23 23
24#undef WIN32
25
24/* The high-level video driver subsystem */ 26/* The high-level video driver subsystem */
25 27
26#include "SDL.h" 28#include "SDL.h"