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:
parent
349e111c81
commit
722ddcf6ba
6 changed files with 15 additions and 0 deletions
|
@ -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>
|
||||||
|
|
|
@ -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!
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue