This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.)
- Loading branch information
Eric Wing
committed
May 9, 2010
1 parent
ee97043
commit 3e943e4
Showing
7 changed files
with
102 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
#include <stdio.h> | ||
#include "SDL.h" | ||
|
||
#ifndef TestSupportRWops_h | ||
#define TestSupportRWops_h | ||
|
||
FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode); | ||
FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode); | ||
SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode); | ||
SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode); | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* Generic implementation for file opening routines. | ||
* Customizations for specific platforms should go in alternative files. | ||
*/ | ||
#include <stdio.h> | ||
#include "SDL.h" | ||
|
||
const char* RWOPS_READ = "rwops/read"; | ||
const char* RWOPS_WRITE = "rwops/write"; | ||
|
||
FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode) | ||
{ | ||
return fopen(file, mode); | ||
} | ||
|
||
FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode) | ||
{ | ||
return fopen(file, mode); | ||
} | ||
|
||
SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode) | ||
{ | ||
return SDL_RWFromFile(file, mode); | ||
} | ||
|
||
SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode) | ||
{ | ||
return SDL_RWFromFile(file, mode); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters