Added a hack for MINGW compatibility.

This commit is contained in:
Aaron van Geffen 2015-12-26 00:57:45 +09:00
parent 43e193ba10
commit eda733165e
1 changed files with 7 additions and 0 deletions

View File

@ -900,6 +900,7 @@ void platform_get_exe_path(utf8 *outPath)
bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer) bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer)
{ {
#ifndef __MINGW32__
wchar_t *fontFolder; wchar_t *fontFolder;
if (SUCCEEDED(SHGetKnownFolderPath(&FOLDERID_Fonts, 0, NULL, &fontFolder))) if (SUCCEEDED(SHGetKnownFolderPath(&FOLDERID_Fonts, 0, NULL, &fontFolder)))
{ {
@ -920,6 +921,12 @@ bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer)
{ {
return false; 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 #endif