1 /*
2  * OpenBOR - http://www.chronocrash.com
3  * -----------------------------------------------------------------------
4  * All rights reserved, see LICENSE in OpenBOR root for details.
5  *
6  * Copyright (c) 2004 - 2014 OpenBOR Team
7  */
8 
9 #ifndef SDLPORT_H
10 #define SDLPORT_H
11 
12 #include <SDL.h>
13 #include <stdlib.h>
14 #include <stdarg.h>
15 #include <stddef.h>
16 #include <string.h>
17 #include <unistd.h>
18 
19 #include "globals.h"
20 
21 #if GP2X || LINUX || OPENDINGUX || SYMBIAN
22 #define stricmp  strcasecmp
23 #define strnicmp strncasecmp
24 #endif
25 
26 #if SDL_VERSION_ATLEAST(2,0,0)
27 #define SDL2 1
28 #endif
29 
30 #if GP2X || DARWIN || OPENDINGUX || ANDROID
31 #define SKIP_CODE
32 #endif
33 
34 #ifdef ANDROID
35 #define MAXTOUCHB 13
36 #endif
37 
38 //#define MEMTEST 1
39 
40 #if _POSIX_C_SOURCE >= 199309L
41 void _usleep(u32 usec);
42 #define usleep _usleep
43 #endif
44 
45 void initSDL();
46 #ifdef ANDROID
47 char* AndroidRoot(char *relPath);
48 extern char rootDir[MAX_BUFFER_LEN];
49 #endif
50 void borExit(int reset);
51 void openborMain(int argc, char** argv);
52 
53 extern char packfile[MAX_FILENAME_LEN];
54 extern char paksDir[MAX_FILENAME_LEN];
55 extern char savesDir[MAX_FILENAME_LEN];
56 extern char logsDir[MAX_FILENAME_LEN];
57 extern char screenShotsDir[MAX_FILENAME_LEN];
58 
59 #endif
60