diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-29 23:36:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-29 23:39:29 +0300 |
commit | 7f2484d82112851dbeba83afd18790a58b03599d (patch) | |
tree | 6449022bbae8a55825febc7b08e3d4095f1de64f /src/main.cpp | |
parent | 24179041d619875bda96eb94307b1f3dd64e6add (diff) | |
download | manaplus-7f2484d82112851dbeba83afd18790a58b03599d.tar.gz manaplus-7f2484d82112851dbeba83afd18790a58b03599d.tar.bz2 manaplus-7f2484d82112851dbeba83afd18790a58b03599d.tar.xz manaplus-7f2484d82112851dbeba83afd18790a58b03599d.zip |
Initial porting to NACL by Vasily_Makarov.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 193610156..f9ee5d5d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -48,6 +48,10 @@ #include <windows.h> #endif +#ifdef __native_client__ +#include <sys/mount.h> +#endif + #include <SDL_image.h> #include <SDL_mixer.h> #include <SDL_version.h> @@ -274,6 +278,15 @@ int main(int argc, char *argv[]) LoadLibrary("exchndl.dll"); #endif +#if defined __native_client__ + // for now for debug hardcoded path + umount("/"); + mount("", "/", "memfs", 0, ""); + mount("", "/persistent", "html5fs", 0, + "type=PERSISTENT,expected_size=104857600"); + mount("http://localhost:5103/my/manaplus", "/http", "httpfs", 0, ""); +#endif + selfName = argv[0]; // Parse command line options @@ -292,7 +305,9 @@ int main(int argc, char *argv[]) } // Initialize PhysicsFS -#ifdef ANDROID +#if defined(__native_client__) + if (!PHYSFS_init("/fakebinary")) +#elif defined(ANDROID) mkdir_r(getSdStoragePath().c_str()); if (!PHYSFS_init((getRealPath(".").append("/fakebinary")).c_str())) |