mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Improve dll loading on Windows.
This commit is contained in:
parent
5ec7dd76e6
commit
5f85ec0cd8
2 changed files with 4 additions and 2 deletions
|
|
@ -14,6 +14,7 @@
|
||||||
#include "FilterNodeD2D1.h"
|
#include "FilterNodeD2D1.h"
|
||||||
#include "ExtendInputEffectD2D1.h"
|
#include "ExtendInputEffectD2D1.h"
|
||||||
#include "Tools.h"
|
#include "Tools.h"
|
||||||
|
#include "nsWindowsHelpers.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
@ -1177,7 +1178,7 @@ DrawTargetD2D1::GetDWriteFactory()
|
||||||
}
|
}
|
||||||
|
|
||||||
decltype(DWriteCreateFactory)* createDWriteFactory;
|
decltype(DWriteCreateFactory)* createDWriteFactory;
|
||||||
HMODULE dwriteModule = LoadLibraryW(L"dwrite.dll");
|
HMODULE dwriteModule = LoadLibrarySystem32(L"dwrite.dll");
|
||||||
createDWriteFactory = (decltype(DWriteCreateFactory)*)
|
createDWriteFactory = (decltype(DWriteCreateFactory)*)
|
||||||
GetProcAddress(dwriteModule, "DWriteCreateFactory");
|
GetProcAddress(dwriteModule, "DWriteCreateFactory");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2616,6 +2616,7 @@ NS_VISIBILITY_DEFAULT PRBool nspr_use_zone_allocator = PR_FALSE;
|
||||||
#ifdef CAIRO_HAS_DWRITE_FONT
|
#ifdef CAIRO_HAS_DWRITE_FONT
|
||||||
|
|
||||||
#include <dwrite.h>
|
#include <dwrite.h>
|
||||||
|
#include "nsWindowsHelpers.h"
|
||||||
|
|
||||||
#ifdef DEBUG_DWRITE_STARTUP
|
#ifdef DEBUG_DWRITE_STARTUP
|
||||||
|
|
||||||
|
|
@ -2644,7 +2645,7 @@ static DWORD WINAPI InitDwriteBG(LPVOID lpdwThreadParam)
|
||||||
{
|
{
|
||||||
SetThreadPriority(GetCurrentThread(), THREAD_MODE_BACKGROUND_BEGIN);
|
SetThreadPriority(GetCurrentThread(), THREAD_MODE_BACKGROUND_BEGIN);
|
||||||
LOGREGISTRY(L"loading dwrite.dll");
|
LOGREGISTRY(L"loading dwrite.dll");
|
||||||
HMODULE dwdll = LoadLibraryW(L"dwrite.dll");
|
HMODULE dwdll = LoadLibrarySystem32(L"dwrite.dll");
|
||||||
if (dwdll) {
|
if (dwdll) {
|
||||||
decltype(DWriteCreateFactory)* createDWriteFactory = (decltype(DWriteCreateFactory)*)
|
decltype(DWriteCreateFactory)* createDWriteFactory = (decltype(DWriteCreateFactory)*)
|
||||||
GetProcAddress(dwdll, "DWriteCreateFactory");
|
GetProcAddress(dwdll, "DWriteCreateFactory");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue