Skip to content
Snippets Groups Projects
Commit 17554c9d authored by Steve Lhomme's avatar Steve Lhomme
Browse files

contrib: libass: don't use tchar for opendir

Since it always assumes it outputs unicode strings even though _UNICODE is not
defined.
parent a179f364
No related branches found
No related tags found
No related merge requests found
--- libass/libass/ass_fontselect.c.tchar 2019-03-19 12:07:15.464633200 +0100
+++ libass/libass/ass_fontselect.c 2019-03-19 12:06:48.404627300 +0100
@@ -48,7 +48,6 @@
#include "ass_string.h"
#include <windows.h>
-#include <tchar.h>
#define ABS(x) ((x) < 0 ? -(x) : (x))
#define MAX_FULLNAME 100
@@ -195,12 +194,12 @@ static inline wchar_t *ToWide (const cha
static void load_fonts_from_dir(ASS_Library *library, const char *dir)
{
wchar_t *dirw = ToWide(dir);
- _TDIR *d = _topendir(dirw);
+ _WDIR *d = _wopendir(dirw);
free(dirw);
if (!d)
return;
while (1) {
- struct _tdirent *entry = _treaddir(d);
+ struct _wdirent *entry = _wreaddir(d);
if (!entry)
break;
char* d_name = FromWide(entry->d_name);
@@ -220,7 +219,7 @@ static void load_fonts_from_dir(ASS_Libr
}
free(d_name);
}
- _tclosedir(d);
+ _wclosedir(d);
}
/**
......@@ -50,6 +50,7 @@ libass: libass-$(ASS_VERSION).tar.gz .sum-ass
$(APPLY) $(SRC)/ass/ass-macosx.patch
ifdef HAVE_WIN32
$(APPLY) $(SRC)/ass/use-topendir.patch
$(APPLY) $(SRC)/ass/libass-no-tchar.patch
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/ass/dwrite.patch
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment