src/file/SDL_rwops.c
changeset 8850 7e248a233387
parent 8833 ae720d61d14d
child 9619 b94b6d0bff0f
equal deleted inserted replaced
8849:1c2c95a5b033 8850:7e248a233387
   764 {
   764 {
   765     const Uint64 swapped = SDL_SwapBE64(value);
   765     const Uint64 swapped = SDL_SwapBE64(value);
   766     return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1);
   766     return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1);
   767 }
   767 }
   768 
   768 
   769 
       
   770 /* SDL_RWops on NACL are implemented using nacl_io, and require mount points
       
   771  * to be established before actual file operations are performed
       
   772  * 
       
   773  * Ref: https://developers.google.com/native-client/dev/devguide/coding/nacl_io?hl=es
       
   774  */
       
   775 
       
   776 int 
       
   777 SDL_RWMount(const char* source, const char* target, const char* filesystemtype, 
       
   778           unsigned long mountflags, const void *data) {
       
   779 #if __NACL__
       
   780     return mount(source, target, filesystemtype, mountflags, data);
       
   781 #endif /* __NACL__ */
       
   782     return SDL_SetError ("Mount not supported on this platform");
       
   783 }
       
   784 
       
   785 int 
       
   786 SDL_RWUmount(const char *target) {
       
   787 #if __NACL__
       
   788     return umount(target);
       
   789 #endif /* __NACL__ */
       
   790     return SDL_SetError ("Umount not supported on this platform");
       
   791 }
       
   792 
       
   793 /* vi: set ts=4 sw=4 expandtab: */
   769 /* vi: set ts=4 sw=4 expandtab: */