src/filesystem/nacl/SDL_sysfilesystem.c
changeset 8878 f7ba2119fd91
parent 8875 c65a4cfdd8b2
child 9327 3644013ad914
equal deleted inserted replaced
8877:0d691f3734ac 8878:f7ba2119fd91
    22 #include "SDL_error.h"
    22 #include "SDL_error.h"
    23 #include "SDL_filesystem.h"
    23 #include "SDL_filesystem.h"
    24 
    24 
    25 #ifdef SDL_FILESYSTEM_NACL
    25 #ifdef SDL_FILESYSTEM_NACL
    26 
    26 
    27 /* SDL_RWops on NACL are implemented using nacl_io, and require mount points
       
    28  * to be established before actual file operations are performed
       
    29  * 
       
    30  * Ref: https://developers.google.com/native-client/dev/devguide/coding/nacl_io
       
    31  */
       
    32 
       
    33 int 
       
    34 SDL_NaClMount(const char* source, const char* target, const char* filesystemtype, 
       
    35           unsigned long mountflags, const void *data) {
       
    36     return mount(source, target, filesystemtype, mountflags, data);
       
    37 }
       
    38 
       
    39 int 
       
    40 SDL_NaClUmount(const char *target) {
       
    41     return umount(target);
       
    42 }
       
    43 
       
    44 
       
    45 char *
    27 char *
    46 SDL_GetBasePath(void)
    28 SDL_GetBasePath(void)
    47 {
    29 {
    48     SDL_Unsupported();
    30     SDL_Unsupported();
    49     return NULL;
    31     return NULL;