1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

dwrite: Use the Unix call helpers.

This commit is contained in:
Alexandre Julliard 2022-11-25 10:11:36 +01:00
parent f340406417
commit 5392bd303e
2 changed files with 3 additions and 7 deletions

View File

@ -36,7 +36,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
HMODULE dwrite_module = 0;
unixlib_handle_t unixlib_handle = 0;
static IDWriteFactory7 *shared_factory;
static void release_shared_factory(IDWriteFactory7 *factory);
@ -47,8 +46,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved)
case DLL_PROCESS_ATTACH:
dwrite_module = hinstDLL;
DisableThreadLibraryCalls( hinstDLL );
if (!NtQueryVirtualMemory(GetCurrentProcess(), hinstDLL, MemoryWineUnixFuncs,
&unixlib_handle, sizeof(unixlib_handle), NULL))
if (!__wine_init_unix_call())
UNIX_CALL(process_attach, NULL);
init_local_fontfile_loader();
break;
@ -56,7 +54,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved)
if (reserved) break;
release_shared_factory(shared_factory);
release_system_fallback_data();
if (unixlib_handle) UNIX_CALL(process_detach, NULL);
UNIX_CALL(process_detach, NULL);
}
return TRUE;
}

View File

@ -108,6 +108,4 @@ enum font_backend_funcs
unix_get_design_glyph_metrics,
};
extern unixlib_handle_t unixlib_handle DECLSPEC_HIDDEN;
#define UNIX_CALL( func, params ) __wine_unix_call( unixlib_handle, unix_ ## func, params )
#define UNIX_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )