Workaround for wrong file permissions from zstd extraction on wasm

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-07-09 00:00:49 +01:00
parent 97a2d5935a
commit e389ca7469
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
2 changed files with 23 additions and 1 deletions

View file

@ -30,6 +30,19 @@
#include_next "common.hpp"
// Workaround for wrong file permissions from zstd extraction
#ifdef __EMSCRIPTEN__
#define fopen fopen_wasm
extern "C" {
FILE* fopen_wasm(const char* filename, const char* mode);
}
namespace std {
using ::fopen_wasm;
}
#endif
// Make binary resources work the same no matter the OS
#undef BINARY
#undef BINARY_START