diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2021-06-26 18:16:41 +0300 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2021-07-10 02:36:31 +0300 |
commit | 2a2d718e0fd6d47072566e519744634d93621353 (patch) | |
tree | 4562f6f4b7bb908061ab56d7f0dfe20da94b4fc6 /libass/ass_fontselect.c | |
parent | 979d7b890af66363dcdef2ae814cebe4053f2898 (diff) | |
download | libass-2a2d718e0fd6d47072566e519744634d93621353.tar.bz2 libass-2a2d718e0fd6d47072566e519744634d93621353.tar.xz |
directwrite: support WinRT/UWP, which forbid LoadLibrary
Normally, we delay loading Dwrite.dll until runtime to allow building
and running DirectWrite-enabled libass binaries on old Windows versions
that lack DirectWrite. However, this is forbidden in WinRT/UWP.
DirectWrite is present in all versions of Windows that support WinRT/UWP,
so we lose nothing by requiring it.
Older Windows SDKs (Microsoft and MinGW alike) lack <winapifamily.h>,
so include it only if we really need it.
Based on VLC patch for libass:
https://github.com/videolan/vlc/commit/eedb57aa96d2bc0046a6da2e081c75ae9edf8fd5
and on this autoconf code:
https://github.com/lu-zero/mfx_dispatch/commit/c51a54c15f51579804030c70592c0a26065f1242
Note: the VLC patch retained an unconditional call to FreeLibrary
in destroy_provider. However, FreeLibrary does not actually expect
NULL as argument, so this commit adds a guard to that call.
Perhaps FreeLibrary(NULL) simply fails cleanly and that's why
this has not caused VLC problems, but we should not rely on this.
Diffstat (limited to 'libass/ass_fontselect.c')
0 files changed, 0 insertions, 0 deletions