mirror of https://github.com/bjornbytes/lovr.git
Fix emscripten entry/exit points;
This commit is contained in:
parent
69b6e599e9
commit
a763a6d2e1
|
@ -9,7 +9,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
lua_State* lovrInit(lua_State* L, int argc, char** argv);
|
||||
void lovrQuit(int status);
|
||||
void lovrDestroy(void* arg);
|
||||
int main(int argc, char** argv);
|
||||
|
||||
#ifndef LOVR_USE_OCULUS_MOBILE
|
||||
|
@ -24,11 +24,13 @@ typedef struct {
|
|||
} lovrEmscriptenContext;
|
||||
|
||||
void lovrDestroy(void* arg) {
|
||||
if (arg) {
|
||||
lovrEmscriptenContext* context = arg;
|
||||
lua_State* L = context->L;
|
||||
emscripten_cancel_main_loop();
|
||||
lua_close(L);
|
||||
}
|
||||
}
|
||||
|
||||
static void emscriptenLoop(void* arg) {
|
||||
lovrEmscriptenContext* context = arg;
|
||||
|
|
Loading…
Reference in New Issue