// SPDX-License-Identifier: ISC // SPDX-FileCopyrightText: 2024 Matthew Wozniak #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