Mercurial > sdl-ios-xcode
comparison test/automated/rwops/TestSupportRWops_Generic.c @ 4451:033c455bbe99
Refactored automated rwops tests so read and write directories can be more easily customized.
The refactored tests were written in recognition that Mac and iPhone current working directories are usually not going to work. Resource directories are in bundles and write directories are restricted to certain areas. In theory, other platforms may have this problem too, hence the refactoring.
Also updated the Xcode iPhone project to use 3.2 as the Base SDK, but 3.1 as the Deployment SDK (for iPhone/iPad compatibility.)
author | Eric Wing <ewing . public |-at-| gmail . com> |
---|---|
date | Sun, 09 May 2010 06:58:30 -0700 |
parents | |
children | 27ab20a36eba |
comparison
equal
deleted
inserted
replaced
4450:abd88bbaea2a | 4451:033c455bbe99 |
---|---|
1 /* Generic implementation for file opening routines. | |
2 * Customizations for specific platforms should go in alternative files. | |
3 */ | |
4 #include <stdio.h> | |
5 #include "SDL.h" | |
6 | |
7 const char* RWOPS_READ = "rwops/read"; | |
8 const char* RWOPS_WRITE = "rwops/write"; | |
9 | |
10 FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode) | |
11 { | |
12 return fopen(file, mode); | |
13 } | |
14 | |
15 FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode) | |
16 { | |
17 return fopen(file, mode); | |
18 } | |
19 | |
20 SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode) | |
21 { | |
22 return SDL_RWFromFile(file, mode); | |
23 } | |
24 | |
25 SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode) | |
26 { | |
27 return SDL_RWFromFile(file, mode); | |
28 } |