Revamp event system to not switch from C++ --> JS twice. Fix transferer node offset

This commit is contained in:
msqr1
2024-10-02 20:42:39 -07:00
parent da3c7a269a
commit 30228eb0c1
9 changed files with 49 additions and 47 deletions

View File

@@ -41,11 +41,7 @@ struct WorkerPool {
~WorkerPool();
void exec(std::function<void()> fn);
};
// Must be called from the main thread
extern "C" void mtFireEv(int index, int typeIdx, int content);
// Must be called from a wasm worker
void fireEv(int index, int typeIdx, const char* content = nullptr);
extern "C" void fireEv(int idx, int typeIdx, const char* content = nullptr);
int untar(unsigned char* tar, int tarSize, const std::string& storepath);