test/automated/rwops/TestSupportRWops_Generic.c
author David Ludwig <dludwig@pobox.com>
Tue, 12 Feb 2013 12:57:06 -0500
changeset 8424 3cf9501008f1
parent 5062 e8916fe9cfc8
child 7191 75360622e65f
permissions -rw-r--r--
WinRT: fixed bug: SDL_CreateWindow wouldn't work after an initial window was created + destroyed
ewing@4451
     1
/* Generic implementation for file opening routines.
ewing@4451
     2
* Customizations for specific platforms should go in alternative files.
ewing@4451
     3
*/
aschiffler@4884
     4
slouken@5062
     5
// quiet windows compiler warnings
aschiffler@4884
     6
#define _CRT_SECURE_NO_WARNINGS
aschiffler@4884
     7
ewing@4451
     8
#include <stdio.h>
ewing@4451
     9
#include "SDL.h"
ewing@4451
    10
ewing@4451
    11
const char* RWOPS_READ = "rwops/read";
ewing@4451
    12
const char* RWOPS_WRITE = "rwops/write";
ewing@4451
    13
ewing@4451
    14
FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode)
ewing@4451
    15
{
ewing@4451
    16
	return fopen(file, mode);
ewing@4451
    17
}
ewing@4451
    18
ewing@4451
    19
FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
ewing@4451
    20
{
ewing@4451
    21
	return fopen(file, mode);
ewing@4451
    22
}
ewing@4451
    23
ewing@4451
    24
SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
ewing@4451
    25
{
ewing@4451
    26
	return SDL_RWFromFile(file, mode);
ewing@4451
    27
}
ewing@4451
    28
ewing@4451
    29
SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
ewing@4451
    30
{
ewing@4451
    31
	return SDL_RWFromFile(file, mode);
ewing@4451
    32
}