Skip to content

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed May 2, 2024
1 parent c41ad39 commit 1e9f6d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/studio/studio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2445,6 +2445,7 @@ bool studio_alive(Studio* studio)
return studio->alive;
}

#if defined(TIC_MODULE_EXT)
static bool onEnumModule(const char* name, const char* title, const char* hash, s32 id, void* data, bool dir)
{
if(strstr(name, TIC_MODULE_EXT))
Expand All @@ -2468,6 +2469,7 @@ static bool onEnumModule(const char* name, const char* title, const char* hash,

return true;
}
#endif

Studio* studio_create(s32 argc, char **argv, s32 samplerate, tic80_pixel_color_format format, const char* folder, s32 maxscale)
{
Expand All @@ -2481,9 +2483,11 @@ Studio* studio_create(s32 argc, char **argv, s32 samplerate, tic80_pixel_color_f
exit(0);
}

#if defined(TIC_MODULE_EXT)
// load script modules
fs_enum(fs_appfolder(), onEnumModule, NULL);

#endif

Studio* studio = NEW(Studio);
*studio = (Studio)
{
Expand Down
4 changes: 2 additions & 2 deletions src/tic.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <stdlib.h>
#include <string.h>

#if !defined(TIC_RUNTIME_STATIC)
#if defined(TIC_MODULE_EXT)
#include <dlfcn.h>
#endif

Expand Down Expand Up @@ -74,7 +74,7 @@ TIC80_API void tic80_load(tic80* tic, void* cart, s32 size)
tic_api_reset(mem);
}

#if !defined(TIC_RUNTIME_STATIC)
#if defined(TIC_MODULE_EXT)
else
{
const char* tag = tic_tool_metatag(mem->cart.code.data, "script", NULL);
Expand Down

0 comments on commit 1e9f6d6

Please sign in to comment.