diff --git a/build/android/jni/src/Android.mk b/build/android/jni/src/Android.mk index a73a590..03c47db 100644 --- a/build/android/jni/src/Android.mk +++ b/build/android/jni/src/Android.mk @@ -52,7 +52,8 @@ LOCAL_SRC_FILES := \ $(SRC_PATH)/dialog.c \ $(SRC_PATH)/menu.c \ $(SRC_PATH)/surf.c \ - $(SRC_PATH)/tic80.c + $(SRC_PATH)/tic80.c \ + $(SRC_PATH)/system.c LOCAL_SHARED_LIBRARIES := SDL2 lua z gif wren diff --git a/src/code.c b/src/code.c index fc8d08f..10ede71 100644 --- a/src/code.c +++ b/src/code.c @@ -753,6 +753,18 @@ static void updateOutlineCode(Code* code) updateEditor(code); } +static char* ticStrlwr(char *string) +{ + char *bufp = string; + while (*bufp) + { + *bufp = tolower((u8)*bufp); + ++bufp; + } + + return string; +} + static void initOutlineMode(Code* code) { OutlineItem* out = code->outline.items; @@ -764,7 +776,7 @@ static void initOutlineMode(Code* code) char filter[STUDIO_TEXT_BUFFER_WIDTH] = {0}; strncpy(filter, code->popup.text, sizeof(filter)); - strlwr(filter); + ticStrlwr(filter); const tic_script_config* config = tic->api.get_script_config(tic); @@ -787,7 +799,7 @@ static void initOutlineMode(Code* code) { strncpy(buffer, out->name, sizeof(buffer)); - strlwr(buffer); + ticStrlwr(buffer); if(strstr(buffer, filter)) out++; else out->pos = NULL; diff --git a/src/fs.c b/src/fs.c index ddf8a7d..0084480 100644 --- a/src/fs.c +++ b/src/fs.c @@ -161,7 +161,7 @@ int _wremove(const wchar_t *); #define tic_stat stat #define tic_remove remove #define tic_fopen fopen -#define tic_mkdir(name) mkdir(name)//, 0700) +#define tic_mkdir(name) mkdir(name, 0700) #endif @@ -679,12 +679,10 @@ void* fsReadFile(const char* path, s32* size) static void makeDir(const char* name) { -#if defined(__EMSCRIPTEN__) - mkdir(name, 0700); - - EM_ASM(FS.syncfs(function(){})); -#else tic_mkdir(UTF8ToString(name)); + +#if defined(__EMSCRIPTEN__) + EM_ASM(FS.syncfs(function(){})); #endif }