From a66d9f9357445c285df890f8bfec282c8020bac6 Mon Sep 17 00:00:00 2001 From: anth64 Date: Sun, 2 Nov 2025 12:30:26 +0100 Subject: [PATCH] add mod dir --- include/stk.h | 2 +- src/module.c | 1 + src/stk.c | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/stk.h b/include/stk.h index a50ab28..5df0dac 100644 --- a/include/stk.h +++ b/include/stk.h @@ -8,7 +8,7 @@ extern "C" { #endif -int stk_init(void); +int stk_init(const char *mod_dir); int stk_shutdown(void); size_t stk_module_count(void); diff --git a/src/module.c b/src/module.c index 8252fd8..30a721a 100644 --- a/src/module.c +++ b/src/module.c @@ -7,6 +7,7 @@ void *platform_get_symbol(void *handle, const char *symbol); typedef void (*stk_module_func)(void); +char *stk_mod_dir = NULL; static void **stk_handles = NULL; static stk_module_func *stk_inits = NULL; static stk_module_func *stk_shutdowns = NULL; diff --git a/src/stk.c b/src/stk.c index 88641a3..acbd924 100644 --- a/src/stk.c +++ b/src/stk.c @@ -1,7 +1,9 @@ #include "stk.h" #include "stk_log.h" -int stk_init(void) +extern char *stk_mod_dir; + +int stk_init(const char *mod_dir) { stk_log(stdout, "[stk] stk initialized v%s!", STK_VERSION_STRING); return 0;