You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[Web] Small fixes and enhancements.
- "Definitive" fix for ENOENT randomly disappearing from emscripten. - Proper shutdown when setup fails. - Re-enable WebGL explicit buffer swap. - Re-enable optional per-pixel transparency. - Add type cast to make closure compiler happy. - Remove emscripten Safari WebGL workaround. - Improve AudioWorklet cleanup.
This commit is contained in:
@@ -106,12 +106,14 @@ autoAddDeps(GodotConfig, '$GodotConfig');
|
||||
mergeInto(LibraryManager.library, GodotConfig);
|
||||
|
||||
const GodotFS = {
|
||||
$GodotFS__deps: ['$ERRNO_CODES', '$FS', '$IDBFS', '$GodotRuntime'],
|
||||
$GodotFS__deps: ['$FS', '$IDBFS', '$GodotRuntime'],
|
||||
$GodotFS__postset: [
|
||||
'Module["initFS"] = GodotFS.init;',
|
||||
'Module["copyToFS"] = GodotFS.copy_to_fs;',
|
||||
].join(''),
|
||||
$GodotFS: {
|
||||
// ERRNO_CODES works every odd version of emscripten, but this will break too eventually.
|
||||
ENOENT: 44,
|
||||
_idbfs: false,
|
||||
_syncing: false,
|
||||
_mount_points: [],
|
||||
@@ -138,8 +140,9 @@ const GodotFS = {
|
||||
try {
|
||||
FS.stat(dir);
|
||||
} catch (e) {
|
||||
if (e.errno !== ERRNO_CODES.ENOENT) {
|
||||
throw e;
|
||||
if (e.errno !== GodotFS.ENOENT) {
|
||||
// Let mkdirTree throw in case, we cannot trust the above check.
|
||||
GodotRuntime.error(e);
|
||||
}
|
||||
FS.mkdirTree(dir);
|
||||
}
|
||||
@@ -208,8 +211,9 @@ const GodotFS = {
|
||||
try {
|
||||
FS.stat(dir);
|
||||
} catch (e) {
|
||||
if (e.errno !== ERRNO_CODES.ENOENT) {
|
||||
throw e;
|
||||
if (e.errno !== GodotFS.ENOENT) {
|
||||
// Let mkdirTree throw in case, we cannot trust the above check.
|
||||
GodotRuntime.error(e);
|
||||
}
|
||||
FS.mkdirTree(dir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user