From eda733165e12c0fbd8f767bd953cb3f181cc3233 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 26 Dec 2015 00:57:45 +0900 Subject: [PATCH] Added a hack for MINGW compatibility. --- src/platform/windows.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/platform/windows.c b/src/platform/windows.c index 39b478d69b..3a447571d3 100644 --- a/src/platform/windows.c +++ b/src/platform/windows.c @@ -900,6 +900,7 @@ void platform_get_exe_path(utf8 *outPath) bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer) { +#ifndef __MINGW32__ wchar_t *fontFolder; if (SUCCEEDED(SHGetKnownFolderPath(&FOLDERID_Fonts, 0, NULL, &fontFolder))) { @@ -920,6 +921,12 @@ bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer) { return false; } +#else + log_warning("MINGW-compatibility hack: falling back to C:\\Windows\\Fonts"); + strcat(buffer, "C:\\Windows\\Fonts\\"); + strcat(buffer, font->filename); + return true; +#endif } #endif