Take out Windows CE code

This commit is contained in:
twinaphex 2014-07-14 04:54:52 +02:00
parent 093a70482f
commit 3af92d87a1
3 changed files with 11 additions and 21 deletions

View File

@ -23,7 +23,7 @@
#define ror(dest, value, shift) \ #define ror(dest, value, shift) \
dest = ((value) >> shift) | ((value) << (32 - shift)) \ dest = ((value) >> shift) | ((value) << (32 - shift)) \
#if defined(_WIN32) || defined(_WIN32_WCE) #if defined(_WIN32)
#define PATH_SEPARATOR "\\" #define PATH_SEPARATOR "\\"
#define PATH_SEPARATOR_CHAR '\\' #define PATH_SEPARATOR_CHAR '\\'
#else #else
@ -34,20 +34,16 @@
// These includes must be used before SDL is included. // These includes must be used before SDL is included.
#ifdef ARM_ARCH #ifdef ARM_ARCH
#ifdef _WIN32_WCE #define _BSD_SOURCE // sync
#include <windows.h> #include <stdlib.h>
#else #include <stdio.h>
#define _BSD_SOURCE // sync #include <string.h>
#include <stdlib.h> #include <math.h>
#include <stdio.h> #include <fcntl.h>
#include <string.h> #include <unistd.h>
#include <math.h> #include <stdarg.h>
#include <fcntl.h> #include <time.h>
#include <unistd.h> #include <sys/time.h>
#include <stdarg.h>
#include <time.h>
#include <sys/time.h>
#endif /* _WIN32_WCE */
#endif /* ARM_ARCH */ #endif /* ARM_ARCH */

4
gui.c
View File

@ -19,15 +19,11 @@
#include "common.h" #include "common.h"
#include "font.h" #include "font.h"
#ifndef _WIN32_WCE
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>
#include <dirent.h> #include <dirent.h>
#endif
#define MAX_PATH 1024 #define MAX_PATH 1024
// Blatantly stolen and trimmed from MZX (megazeux.sourceforge.net) // Blatantly stolen and trimmed from MZX (megazeux.sourceforge.net)

2
main.c
View File

@ -133,14 +133,12 @@ static const char *file_ext[] = { ".gba", ".bin", ".zip", NULL };
#ifndef PSP_BUILD #ifndef PSP_BUILD
static void ChangeWorkingDirectory(char *exe) static void ChangeWorkingDirectory(char *exe)
{ {
#ifndef _WIN32_WCE
char *s = strrchr(exe, '/'); char *s = strrchr(exe, '/');
if (s != NULL) { if (s != NULL) {
*s = '\0'; *s = '\0';
chdir(exe); chdir(exe);
*s = '/'; *s = '/';
} }
#endif
} }
static void switch_to_romdir(void) static void switch_to_romdir(void)