Skip to content
Permalink
Browse files

The NaCL mount/unmount functions need to be in SDL_system.h and speci…

…fic to NaCL
  • Loading branch information
slouken committed Jun 8, 2014
1 parent be74705 commit 5ae12b46b54306d3e5fbb78f9fca042dbec2d0b2

File 2 of 2 in 5ae12b4

@@ -766,28 +766,4 @@ SDL_WriteBE64(SDL_RWops * dst, Uint64 value)
return SDL_RWwrite(dst, &swapped, sizeof (swapped), 1);
}


/* SDL_RWops on NACL are implemented using nacl_io, and require mount points
* to be established before actual file operations are performed
*
* Ref: https://developers.google.com/native-client/dev/devguide/coding/nacl_io?hl=es
*/

int
SDL_RWMount(const char* source, const char* target, const char* filesystemtype,
unsigned long mountflags, const void *data) {
#if __NACL__
return mount(source, target, filesystemtype, mountflags, data);
#endif /* __NACL__ */
return SDL_SetError ("Mount not supported on this platform");
}

int
SDL_RWUmount(const char *target) {
#if __NACL__
return umount(target);
#endif /* __NACL__ */
return SDL_SetError ("Umount not supported on this platform");
}

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 5ae12b4

Please sign in to comment.