Fix file preloading warning in HTML5 platform
This commit is contained in:
parent
9d78274e06
commit
81554dac61
2 changed files with 2 additions and 5 deletions
|
@ -129,10 +129,6 @@ def configure(env):
|
||||||
# us since we don't know requirements at compile-time.
|
# us since we don't know requirements at compile-time.
|
||||||
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
|
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
|
||||||
|
|
||||||
# Since we use both memory growth and MEMFS preloading,
|
|
||||||
# this avoids unnecessary copying on start-up.
|
|
||||||
env.Append(LINKFLAGS=['--no-heap-copy'])
|
|
||||||
|
|
||||||
# This setting just makes WebGL 2 APIs available, it does NOT disable WebGL 1.
|
# This setting just makes WebGL 2 APIs available, it does NOT disable WebGL 1.
|
||||||
env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1'])
|
env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1'])
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,8 @@
|
||||||
}
|
}
|
||||||
LIBS.FS.mkdirTree(dir);
|
LIBS.FS.mkdirTree(dir);
|
||||||
}
|
}
|
||||||
LIBS.FS.createDataFile('/', file.path, new Uint8Array(file.buffer), true, true, true);
|
// With memory growth, canOwn should be false.
|
||||||
|
LIBS.FS.createDataFile(file.path, null, new Uint8Array(file.buffer), true, true, false);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
preloadedFiles = null;
|
preloadedFiles = null;
|
||||||
|
|
Loading…
Reference in a new issue