diff options
Diffstat (limited to 'apps/plugins/sdl/include')
-rw-r--r-- | apps/plugins/sdl/include/SDL_config_rockbox.h | 17 | ||||
-rw-r--r-- | apps/plugins/sdl/include/SDL_platform.h | 1 |
2 files changed, 16 insertions, 2 deletions
diff --git a/apps/plugins/sdl/include/SDL_config_rockbox.h b/apps/plugins/sdl/include/SDL_config_rockbox.h index e268a73a8b..2b7f9a6793 100644 --- a/apps/plugins/sdl/include/SDL_config_rockbox.h +++ b/apps/plugins/sdl/include/SDL_config_rockbox.h | |||
@@ -38,7 +38,8 @@ | |||
38 | 38 | ||
39 | //#define COMBINED_SDL | 39 | //#define COMBINED_SDL |
40 | 40 | ||
41 | /* games will use this sample rate */ | 41 | /* "recommended" sample rate for Rockbox. Games should use this by |
42 | * default unless necessary to do otherwise. */ | ||
42 | #ifdef SIMULATOR | 43 | #ifdef SIMULATOR |
43 | #define RB_SAMPR SAMPR_44 | 44 | #define RB_SAMPR SAMPR_44 |
44 | #else | 45 | #else |
@@ -57,6 +58,7 @@ | |||
57 | /* woot */ | 58 | /* woot */ |
58 | #define SDL_AUDIO_DRIVER_ROCKBOX 1 | 59 | #define SDL_AUDIO_DRIVER_ROCKBOX 1 |
59 | #define SDL_THREAD_ROCKBOX 1 | 60 | #define SDL_THREAD_ROCKBOX 1 |
61 | #undef SDL_THREAD_PTHREAD | ||
60 | #define SDL_TIMER_ROCKBOX 1 | 62 | #define SDL_TIMER_ROCKBOX 1 |
61 | #define SDL_VIDEO_DRIVER_ROCKBOX 1 | 63 | #define SDL_VIDEO_DRIVER_ROCKBOX 1 |
62 | 64 | ||
@@ -78,6 +80,10 @@ | |||
78 | #define HAVE_FREE 1 | 80 | #define HAVE_FREE 1 |
79 | #define HAVE_REALLOC 1 | 81 | #define HAVE_REALLOC 1 |
80 | #define HAVE_QSORT 1 | 82 | #define HAVE_QSORT 1 |
83 | #define HAVE_STRLEN 1 | ||
84 | #define HAVE_STRLCPY 1 | ||
85 | #define HAVE_STRCMP 1 | ||
86 | #define HAVE_STRNCMP 1 | ||
81 | 87 | ||
82 | #undef strdup | 88 | #undef strdup |
83 | 89 | ||
@@ -116,6 +122,7 @@ | |||
116 | #define floor floor_wrapper | 122 | #define floor floor_wrapper |
117 | #define fmod fmod_wrapper | 123 | #define fmod fmod_wrapper |
118 | #define free tlsf_free | 124 | #define free tlsf_free |
125 | #define fscanf fscanf_wrapper | ||
119 | #define getchar() rb->sleep(2*HZ) | 126 | #define getchar() rb->sleep(2*HZ) |
120 | #define getenv SDL_getenv | 127 | #define getenv SDL_getenv |
121 | #define log rb_log | 128 | #define log rb_log |
@@ -146,6 +153,7 @@ | |||
146 | #define strcpy strcpy_wrapper | 153 | #define strcpy strcpy_wrapper |
147 | #define strdup strdup_wrapper | 154 | #define strdup strdup_wrapper |
148 | #define strerror(x) "error" | 155 | #define strerror(x) "error" |
156 | #define strlcpy rb->strlcpy | ||
149 | #define strlen rb->strlen | 157 | #define strlen rb->strlen |
150 | #define strncasecmp rb->strncasecmp | 158 | #define strncasecmp rb->strncasecmp |
151 | #define strncat rb->strlcat /* hack */ | 159 | #define strncat rb->strlcat /* hack */ |
@@ -163,8 +171,12 @@ | |||
163 | #define vsnprintf rb->vsnprintf | 171 | #define vsnprintf rb->vsnprintf |
164 | #define vsprintf vsprintf_wrapper | 172 | #define vsprintf vsprintf_wrapper |
165 | 173 | ||
174 | // use Rockbox's string routines | ||
175 | #define SDL_memcpy memcpy | ||
176 | #define SDL_memcmp memcmp | ||
177 | |||
166 | #define M_PI 3.14159265358979323846 | 178 | #define M_PI 3.14159265358979323846 |
167 | #define EOF 0xff | 179 | #define EOF (-1) |
168 | 180 | ||
169 | #define LOAD_XPM | 181 | #define LOAD_XPM |
170 | #define MID_MUSIC | 182 | #define MID_MUSIC |
@@ -194,6 +206,7 @@ int vprintf(const char *fmt, va_list ap); | |||
194 | void fatal(char *fmt, ...); | 206 | void fatal(char *fmt, ...); |
195 | void rb_exit(int rc); | 207 | void rb_exit(int rc); |
196 | void rbsdl_atexit(void (*)(void)); | 208 | void rbsdl_atexit(void (*)(void)); |
209 | float atof_wrapper (char *str); | ||
197 | 210 | ||
198 | /* speed */ | 211 | /* speed */ |
199 | static inline uint16_t readLE16(void *addr) | 212 | static inline uint16_t readLE16(void *addr) |
diff --git a/apps/plugins/sdl/include/SDL_platform.h b/apps/plugins/sdl/include/SDL_platform.h index 22c320118b..40df082205 100644 --- a/apps/plugins/sdl/include/SDL_platform.h +++ b/apps/plugins/sdl/include/SDL_platform.h | |||
@@ -108,6 +108,7 @@ | |||
108 | #endif | 108 | #endif |
109 | #if defined(ROCKBOX) | 109 | #if defined(ROCKBOX) |
110 | #undef __ROCKBOX__ | 110 | #undef __ROCKBOX__ |
111 | #undef __LINUX__ /* maybe sim */ | ||
111 | #define __ROCKBOX__ 1 | 112 | #define __ROCKBOX__ 1 |
112 | #endif | 113 | #endif |
113 | 114 | ||