diff options
author | 2024-10-27 23:28:51 -0400 | |
---|---|---|
committer | 2024-10-27 23:28:51 -0400 | |
commit | fb95177298bb92098b61f09b9f66c1fce32f2f02 (patch) | |
tree | c73b45c91f145dca7d055a1cde1f4efaa6db8da6 /api.c | |
parent | 36b6d84ee4b520bdf43891ea86df03cf660cb464 (diff) | |
download | rt-master.tar.gz rt-master.zip |
Diffstat (limited to 'api.c')
-rw-r--r-- | api.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: ISC
+// SPDX-FileCopyrightText: 2024 Matthew Wozniak <me@woz.blue>
+
+#define NO_EXTERNS
+#include "api.h"
+#undef NO_EXTERNS
+#include "os.h"
+#include "log.h"
+
+struct engserver *engserver;
+
+void api_init() {
+ void *engine_dll = os_dlopen("engine");
+ createinterface_func engine_factory =
+ (createinterface_func)os_dlsym(engine_dll, "CreateInterface");
+ if (!engine_factory) die("couldn't get engine factory");
+ engserver = engine_factory(INTERFACEVERSION_VENGINESERVER, NULL);
+ if (!engserver) die("couldn't get IVEngineServer from engine");
+}
+
+// vi: sw=4 ts=4 noet tw=80 cc=80
|