From 36b6d84ee4b520bdf43891ea86df03cf660cb464 Mon Sep 17 00:00:00 2001 From: Matthew Wozniak Date: Fri, 25 Oct 2024 23:24:45 -0400 Subject: create project --- main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 main.c (limited to 'main.c') diff --git a/main.c b/main.c new file mode 100644 index 0000000..ae79d3b --- /dev/null +++ b/main.c @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: ISC +// SPDX-FileCopyrightText: 2024 Matthew Wozniak + +#include "os.h" +#include "log.h" + +#include +#include + +typedef int (*LauncherMain_t)(void *instance, void *prev_inst, char *cmdline, + int cmd_show); + +int main(int argc, char **argv) { + SetDllDirectoryA("bin/"); + + void *launcher_dll = os_dlopen("launcher"); + LauncherMain_t launcher_main = + (LauncherMain_t)os_dlsym(launcher_dll, "LauncherMain"); + + if (!launcher_main) die("couldn't open launcher"); + launcher_main(NULL, NULL, NULL, 0); +} + +// vi: sw=4 ts=4 noet tw=80 cc=80 -- cgit v1.2.3-54-g00ecf