DirectWrite support #28
1 changed files with 14 additions and 0 deletions
commit
fbc2679fc3
|
|
@ -532,6 +532,20 @@ static CustomTextRenderer* CustomTextRenderer_Create(IDWriteFactory6* write_fact
|
|||
|
||||
int MWFL_DWSetup(void) {
|
||||
HRESULT hr;
|
||||
HANDLE ole32lib;
|
||||
/* CoInitialize, to my knowledge, is avaliable on every Windows version we actually support. But as of writing, CI fails because a specific mingw won't link to it by default. I'm not gonna waste my time chancing that it will properly link to ole32 either. */
|
||||
HRESULT (*CoInitialize)(LPVOID pvReserved);
|
||||
|
||||
ole32lib = LoadLibrary("Ole32.dll");
|
||||
if(!ole32lib) {
|
||||
printf("ole32lib not found, cannot use DirectWrite\n");
|
||||
return 1;
|
||||
}
|
||||
CoInitialize = (HRESULT (*)(LPVOID pvReserved))GetProcAddress(ole32lib, "CoInitialize");
|
||||
if(!CoInitialize) {
|
||||
printf("CoInitialize not found, cannot use DirectWrite\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
CoInitialize(NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue