|
@@ -30,6 +30,10 @@
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
|
|
+#ifdef __EMSCRIPTEN__
|
|
|
|
|
+#include <emscripten.h>
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
using std::istream;
|
|
using std::istream;
|
|
|
using std::ostream;
|
|
using std::ostream;
|
|
|
using std::string;
|
|
using std::string;
|
|
@@ -973,6 +977,15 @@ ns_release_all_textures() {
|
|
|
|
|
|
|
|
// Blow away the cache of resolved relative filenames.
|
|
// Blow away the cache of resolved relative filenames.
|
|
|
_relpath_lookup.clear();
|
|
_relpath_lookup.clear();
|
|
|
|
|
+
|
|
|
|
|
+#ifdef __EMSCRIPTEN__
|
|
|
|
|
+ // Also empty the emscripten preload cache.
|
|
|
|
|
+ EM_ASM({
|
|
|
|
|
+ if (Module["preloadedImages"]) {
|
|
|
|
|
+ Module["preloadedImages"] = {};
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+#endif
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|