|
@@ -178,7 +178,7 @@ STBIWDEF int stbi_write_tga(char const *filename, int w, int h, int comp, const
|
|
STBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
|
|
STBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data);
|
|
STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality);
|
|
STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality);
|
|
|
|
|
|
-#ifdef STBI_WINDOWS_UTF8
|
|
|
|
|
|
+#ifdef STBIW_WINDOWS_UTF8
|
|
STBIWDEF int stbiw_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input);
|
|
STBIWDEF int stbiw_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input);
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
@@ -285,7 +285,7 @@ static void stbi__stdio_write(void *context, void *data, int size)
|
|
fwrite(data,1,size,(FILE*) context);
|
|
fwrite(data,1,size,(FILE*) context);
|
|
}
|
|
}
|
|
|
|
|
|
-#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8)
|
|
|
|
|
|
+#if defined(_WIN32) && defined(STBIW_WINDOWS_UTF8)
|
|
#ifdef __cplusplus
|
|
#ifdef __cplusplus
|
|
#define STBIW_EXTERN extern "C"
|
|
#define STBIW_EXTERN extern "C"
|
|
#else
|
|
#else
|
|
@@ -303,7 +303,7 @@ STBIWDEF int stbiw_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const w
|
|
static FILE *stbiw__fopen(char const *filename, char const *mode)
|
|
static FILE *stbiw__fopen(char const *filename, char const *mode)
|
|
{
|
|
{
|
|
FILE *f;
|
|
FILE *f;
|
|
-#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8)
|
|
|
|
|
|
+#if defined(_WIN32) && defined(STBIW_WINDOWS_UTF8)
|
|
wchar_t wMode[64];
|
|
wchar_t wMode[64];
|
|
wchar_t wFilename[1024];
|
|
wchar_t wFilename[1024];
|
|
if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename)/sizeof(*wFilename)))
|
|
if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename)/sizeof(*wFilename)))
|