Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.0KB

  1. diff --git a/src/fccfg.c b/src/fccfg.c
  2. index d7c48e8..e9861aa 100644
  3. --- a/src/fccfg.c
  4. +++ b/src/fccfg.c
  5. @@ -1885,12 +1885,12 @@ FcConfigSubstitute (FcConfig *config,
  6. return FcConfigSubstituteWithPat (config, p, 0, kind);
  7. }
  8. -#if defined (_WIN32)
  9. +#if defined(_WIN32)
  10. static FcChar8 fontconfig_path[1000] = ""; /* MT-dontcare */
  11. FcChar8 fontconfig_instprefix[1000] = ""; /* MT-dontcare */
  12. -# if (defined (PIC) || defined (DLL_EXPORT))
  13. +# if 0
  14. BOOL WINAPI
  15. DllMain (HINSTANCE hinstDLL,
  16. @@ -2039,8 +2039,11 @@ FcConfigGetPath (void)
  17. #ifdef _WIN32
  18. if (fontconfig_path[0] == '\0')
  19. {
  20. + HMODULE module = NULL;
  21. + GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
  22. + (LPCSTR) &FcConfigGetPath, &module);
  23. char *p;
  24. - if(!GetModuleFileName(NULL, (LPCH) fontconfig_path, sizeof(fontconfig_path)))
  25. + if(!GetModuleFileName(module, (LPCH) fontconfig_path, sizeof(fontconfig_path)))
  26. goto bail1;
  27. p = strrchr ((const char *) fontconfig_path, '\\');
  28. if (p) *p = '\0';