add mod dir

This commit is contained in:
2025-11-02 12:30:26 +01:00
parent 5ab3da22ae
commit a66d9f9357
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
extern "C" { extern "C" {
#endif #endif
int stk_init(void); int stk_init(const char *mod_dir);
int stk_shutdown(void); int stk_shutdown(void);
size_t stk_module_count(void); size_t stk_module_count(void);
+1
View File
@@ -7,6 +7,7 @@ void *platform_get_symbol(void *handle, const char *symbol);
typedef void (*stk_module_func)(void); typedef void (*stk_module_func)(void);
char *stk_mod_dir = NULL;
static void **stk_handles = NULL; static void **stk_handles = NULL;
static stk_module_func *stk_inits = NULL; static stk_module_func *stk_inits = NULL;
static stk_module_func *stk_shutdowns = NULL; static stk_module_func *stk_shutdowns = NULL;
+3 -1
View File
@@ -1,7 +1,9 @@
#include "stk.h" #include "stk.h"
#include "stk_log.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); stk_log(stdout, "[stk] stk initialized v%s!", STK_VERSION_STRING);
return 0; return 0;