Fix ma_dlopen() on the GDK build.

This commit is contained in:
David Reid
2023-05-06 08:50:55 +10:00
parent 902c19d6ab
commit a1ea4438ee
+3 -3
View File
@@ -18455,9 +18455,9 @@ MA_API ma_handle ma_dlopen(ma_context* pContext, const char* filename)
ma_log_postf(ma_context_get_log(pContext), MA_LOG_LEVEL_DEBUG, "Loading library: %s\n", filename);
#ifdef _WIN32
#ifdef MA_WIN32
/* From MSDN: Desktop applications cannot use LoadPackagedLibrary; if a desktop application calls this function it fails with APPMODEL_ERROR_NO_PACKAGE.*/
#if !defined(WINAPI_FAMILY) || (defined(WINAPI_FAMILY) && (defined(WINAPI_FAMILY_DESKTOP_APP) && WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP))
#if !defined(MA_WIN32_UWP)
handle = (ma_handle)LoadLibraryA(filename);
#else
/* *sigh* It appears there is no ANSI version of LoadPackagedLibrary()... */
@@ -18493,7 +18493,7 @@ MA_API ma_handle ma_dlopen(ma_context* pContext, const char* filename)
MA_API void ma_dlclose(ma_context* pContext, ma_handle handle)
{
#ifndef MA_NO_RUNTIME_LINKING
#ifdef _WIN32
#ifdef MA_WIN32
FreeLibrary((HMODULE)handle);
#else
dlclose((void*)handle);