Core: Fixed problem with Win32 GetTimeFormat name clash

This commit is contained in:
Mirek Fidler 2024-01-08 14:42:03 +01:00
parent 3be824bcfd
commit f19d41198c
3 changed files with 21 additions and 1 deletions

View file

@ -78,6 +78,16 @@ void SetDateFormat(const char *fmt)
strncpy(s_date_format_main, fmt, 63);
}
#ifdef PLATFORM_WIN32 // resolve nameclash with win32 API
#ifdef GetDateFormatA
#undef GetDateFormatA
#endif
#ifdef GetDateFormatW
#undef GetDateFormatW
#endif
#endif
String GetDateFormat()
{
return *s_date_format_thread ? s_date_format_thread : s_date_format_main;

View file

@ -80,6 +80,16 @@ void SetDateFormat(const char *fmt);
void SetDateScan(const char *scan);
void SetDateFilter(const char *seps);
#ifdef PLATFORM_WIN32 // resolve nameclash with win32 API
#ifdef GetDateFormatA
#undef GetDateFormatA
#endif
#ifdef GetDateFormatW
#undef GetDateFormatW
#endif
#endif
String GetDateFormat();
const char *StrToDate(const char *fmt, Date& d, const char *s, Date def = Null);

View file

@ -27,7 +27,7 @@ struct sGlyphTextureMaker : LRUCache<GLTexture>::Maker {
Color color;
virtual String Key() const {
StringBuffer h;
String h;
RawCat(h, chr);
RawCat(h, font);
RawCat(h, angle);