This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
/
TestSupportRWops_Generic.c
32 lines (25 loc) · 801 Bytes
1
2
3
4
/* Generic implementation for file opening routines.
* Customizations for specific platforms should go in alternative files.
*/
5
/* quiet windows compiler warnings */
6
7
8
9
10
11
12
13
14
15
#define _CRT_SECURE_NO_WARNINGS
#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)
{
16
return fopen(file, mode);
17
18
19
20
}
FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
{
21
return fopen(file, mode);
22
23
24
25
}
SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
{
26
return SDL_RWFromFile(file, mode);
27
28
29
30
}
SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
{
31
return SDL_RWFromFile(file, mode);
32
}