add steam module
This commit is contained in:
@@ -48,6 +48,9 @@
|
||||
#include "qjs_spline.h"
|
||||
#include "qjs_js.h"
|
||||
#include "qjs_debug.h"
|
||||
#ifndef NSTEAM
|
||||
#include "qjs_steam.h"
|
||||
#endif
|
||||
|
||||
SDL_Window *global_window;
|
||||
|
||||
@@ -1041,6 +1044,9 @@ JS_FreeValue(js,v); \
|
||||
} \
|
||||
|
||||
JSC_CCALL(os_engine_start,
|
||||
if (!SDL_Init(SDL_INIT_VIDEO))
|
||||
return JS_ThrowInternalError(js, "Unable to initialize video subsystem: %s", SDL_GetError());
|
||||
|
||||
if (SDL_GetCurrentThreadID() != main_thread)
|
||||
return JS_ThrowInternalError(js, "This can only be called from the root actor.");
|
||||
|
||||
@@ -2870,6 +2876,10 @@ void ffi_load(JSContext *js)
|
||||
arrput(rt->module_registry, MISTLINE(tracy));
|
||||
#endif
|
||||
|
||||
#ifndef NSTEAM
|
||||
arrput(rt->module_registry, MISTLINE(steam));
|
||||
#endif
|
||||
|
||||
JSValue globalThis = JS_GetGlobalObject(js);
|
||||
|
||||
JSValue prosp = JS_NewObject(js);
|
||||
|
||||
Reference in New Issue
Block a user