Skip to content

Commit d031a49

Browse files
committed
Harmony port: entrypoint
1 parent b182ae0 commit d031a49

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/ohos/SDL_ohos.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,12 @@ static napi_value sdlLaunchMain(napi_env env, napi_callback_info info)
202202
size_t fstringSize = 0;
203203
napi_get_value_string_utf8(env, args[1], NULL, 0, &fstringSize);
204204
char* fname = SDL_malloc(fstringSize + 1);
205-
napi_get_value_string_utf8(env, args[1], libname, fstringSize + 1, &fstringSize);
205+
napi_get_value_string_utf8(env, args[1], fname, fstringSize + 1, &fstringSize);
206206

207207
void* lib = dlopen(libname, RTLD_LAZY);
208208
void* func = dlsym(lib, fname);
209-
SDL_Log("Main func: %lld", (long long)func);
209+
typedef int (*test)();
210+
((test)func)();
210211
dlclose(lib);
211212

212213
napi_value result;

0 commit comments

Comments
 (0)