diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-29 14:13:33 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-29 14:29:33 +0000 |
commit | 2ee2ca7dfb0913eef79708dc4100f87b9557e128 (patch) | |
tree | 9df45decf2d7d940ff19641adea50fe7122805f7 | |
parent | 0d7b7b74c6015a068c410238295e0e7304af6a29 (diff) | |
download | UXP-2ee2ca7dfb0913eef79708dc4100f87b9557e128.tar UXP-2ee2ca7dfb0913eef79708dc4100f87b9557e128.tar.gz UXP-2ee2ca7dfb0913eef79708dc4100f87b9557e128.tar.lz UXP-2ee2ca7dfb0913eef79708dc4100f87b9557e128.tar.xz UXP-2ee2ca7dfb0913eef79708dc4100f87b9557e128.zip |
Improve dll loading on Windows.
-rw-r--r-- | gfx/2d/DrawTargetD2D1.cpp | 3 | ||||
-rw-r--r-- | toolkit/xre/nsAppRunner.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gfx/2d/DrawTargetD2D1.cpp b/gfx/2d/DrawTargetD2D1.cpp index d9deb4c10..a2e854107 100644 --- a/gfx/2d/DrawTargetD2D1.cpp +++ b/gfx/2d/DrawTargetD2D1.cpp @@ -14,6 +14,7 @@ #include "FilterNodeD2D1.h" #include "ExtendInputEffectD2D1.h" #include "Tools.h" +#include "nsWindowsHelpers.h" using namespace std; @@ -1177,7 +1178,7 @@ DrawTargetD2D1::GetDWriteFactory() } decltype(DWriteCreateFactory)* createDWriteFactory; - HMODULE dwriteModule = LoadLibraryW(L"dwrite.dll"); + HMODULE dwriteModule = LoadLibrarySystem32(L"dwrite.dll"); createDWriteFactory = (decltype(DWriteCreateFactory)*) GetProcAddress(dwriteModule, "DWriteCreateFactory"); diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 55072c474..a2f7b89b2 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -2615,6 +2615,7 @@ NS_VISIBILITY_DEFAULT PRBool nspr_use_zone_allocator = PR_FALSE; #ifdef CAIRO_HAS_DWRITE_FONT #include <dwrite.h> +#include "nsWindowsHelpers.h" #ifdef DEBUG_DWRITE_STARTUP @@ -2643,7 +2644,7 @@ static DWORD WINAPI InitDwriteBG(LPVOID lpdwThreadParam) { SetThreadPriority(GetCurrentThread(), THREAD_MODE_BACKGROUND_BEGIN); LOGREGISTRY(L"loading dwrite.dll"); - HMODULE dwdll = LoadLibraryW(L"dwrite.dll"); + HMODULE dwdll = LoadLibrarySystem32(L"dwrite.dll"); if (dwdll) { decltype(DWriteCreateFactory)* createDWriteFactory = (decltype(DWriteCreateFactory)*) GetProcAddress(dwdll, "DWriteCreateFactory"); |