aboutsummaryrefslogtreecommitdiff
path: root/system/lib
diff options
context:
space:
mode:
Diffstat (limited to 'system/lib')
-rw-r--r--system/lib/embind/bind.cpp1
-rw-r--r--system/lib/sdl.cpp13
-rw-r--r--system/lib/sdl.symbols1
3 files changed, 15 insertions, 0 deletions
diff --git a/system/lib/embind/bind.cpp b/system/lib/embind/bind.cpp
index ec1648a9..12264dfd 100644
--- a/system/lib/embind/bind.cpp
+++ b/system/lib/embind/bind.cpp
@@ -59,4 +59,5 @@ EMSCRIPTEN_BINDINGS(native_and_builtin_types) {
_embind_register_std_string(TypeID<std::string>::get(), "std::string");
_embind_register_std_wstring(TypeID<std::wstring>::get(), sizeof(wchar_t), "std::wstring");
_embind_register_emval(TypeID<val>::get(), "emscripten::val");
+ _embind_register_memory_view(TypeID<memory_view>::get(), "emscripten::memory_view");
}
diff --git a/system/lib/sdl.cpp b/system/lib/sdl.cpp
new file mode 100644
index 00000000..7038cdb1
--- /dev/null
+++ b/system/lib/sdl.cpp
@@ -0,0 +1,13 @@
+
+#include <stdlib.h>
+
+// force malloc&free to be included in from libc
+struct Force {
+ Force() {
+ void *x = malloc(10);
+ free(x);
+ }
+};
+
+static Force f;
+
diff --git a/system/lib/sdl.symbols b/system/lib/sdl.symbols
new file mode 100644
index 00000000..c2c0af42
--- /dev/null
+++ b/system/lib/sdl.symbols
@@ -0,0 +1 @@
+ W SDL_Init