2024-03-26 13:05:25 -05:00
|
|
|
#include "steam.h"
|
|
|
|
|
2024-03-26 14:57:35 -05:00
|
|
|
#include <steam/steam_api.h>
|
|
|
|
#include <steam/steam_api_flat.h>
|
2024-03-26 13:05:25 -05:00
|
|
|
|
2024-03-26 14:57:35 -05:00
|
|
|
static JSValue js_steam_init(JSContext *js, JSValue this_v, int argc, JSValue *argv)
|
2024-03-26 13:05:25 -05:00
|
|
|
{
|
|
|
|
SteamAPI_Init();
|
|
|
|
return JS_UNDEFINED;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const JSCFunctionListEntry js_steam_funcs[] = {
|
2024-03-26 14:57:35 -05:00
|
|
|
MIST_FUNC_DEF(steam, init, 1),
|
2024-03-26 13:05:25 -05:00
|
|
|
};
|
|
|
|
|
2024-03-26 14:57:35 -05:00
|
|
|
JSValue js_init_steam(JSContext *js)
|
2024-03-26 13:05:25 -05:00
|
|
|
{
|
2024-03-26 14:57:35 -05:00
|
|
|
JSValue steam = JS_NewObject(js);
|
|
|
|
JS_SetPropertyFunctionList(js, steam, js_steam_funcs, countof(js_steam_funcs));
|
|
|
|
return steam;
|
2024-03-26 13:05:25 -05:00
|
|
|
}
|