From 14bc1593f887e4d883ea3e04e82e8f4687b455df Mon Sep 17 00:00:00 2001 From: Holmes Futrell Date: Fri, 15 Aug 2008 00:57:58 +0000 Subject: [PATCH] Added lines to change path when run on iPhone. Reason: iPhone operates in sandbox and so cannot write files just anywhere ... I use the documents folder in this test. --- test/testfile.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/testfile.c b/test/testfile.c index 1892aee3f..a6047e5a6 100644 --- a/test/testfile.c +++ b/test/testfile.c @@ -14,9 +14,14 @@ #include /* WARNING ! those 2 files will be destroyed by this test program */ -#define FBASENAME1 "sdldata1" /* this file will be created during tests */ -#define FBASENAME2 "sdldata2" /* this file should not exists before starting test */ +#ifdef __IPHONEOS__ + #define FBASENAME1 "../Documents/sdldata1" /* this file will be created during tests */ + #define FBASENAME2 "../Documents/sdldata2" /* this file should not exist before starting test */ +#else + #define FBASENAME1 "sdldata1" /* this file will be created during tests */ + #define FBASENAME2 "sdldata2" /* this file should not exist before starting test */ +#endif #ifndef NULL #define NULL ((void *)0)