update milepost and use new file path functions

This commit is contained in:
Martin Fouilleul 2023-05-24 16:31:01 +02:00
parent 33dd2214a8
commit 02014a6ddf
3 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 9b29e681fe777799b66f91dc450439ba16af17d0
Subproject commit 02bfe587c882ecae0ac7fba22f48808113d4f93d

View File

@ -196,7 +196,7 @@ io_path_walk_result io_path_walk(str8 path)
str8_list_push(scratch, &sep, STR8("/"));
str8_list pathElements = str8_split(scratch, path, sep);
str8 execPath = mp_path_directory(mp_app_get_executable_path(scratch));
str8 execPath = path_slice_directory(path_find_executable(scratch));
str8_list list = {0};
str8_list_push(scratch, &list, execPath);
str8_list_push(scratch, &list, STR8("../app/data"));
@ -426,7 +426,7 @@ io_cmp io_open(io_req* req)
mem_arena* scratch = mem_scratch();
mem_arena_marker mark = mem_arena_mark(scratch);
str8 name = mp_path_base_name(path);
str8 name = path_slice_filename(path);
char* nameCStr = str8_to_cstring(scratch, name);
int fd = openat(walkRes.fd, nameCStr, flags, mode);
close(walkRes.fd);

View File

@ -52,7 +52,7 @@ int orca_assert(const char* file, const char* function, int line, const char* sr
mg_font orca_font_create(const char* resourcePath)
{
//NOTE(martin): create default font
str8 fontPath = mp_app_get_resource_path(mem_scratch(), resourcePath);
str8 fontPath = path_find_resource(mem_scratch(), STR8(resourcePath));
char* fontPathCString = str8_to_cstring(mem_scratch(), fontPath);
FILE* fontFile = fopen(fontPathCString, "r");
@ -363,7 +363,7 @@ void* orca_runloop(void* user)
//NOTE: loads wasm module
const char* bundleNameCString = "module";
str8 modulePath = mp_app_get_resource_path(mem_scratch(), "../app/wasm/module.wasm");
str8 modulePath = path_find_resource(mem_scratch(), STR8("../app/wasm/module.wasm"));
const char* modulePathCString = str8_to_cstring(mem_scratch(), modulePath);
FILE* file = fopen(modulePathCString, "rb");