diff options
Diffstat (limited to 'source/blender/imbuf/intern/dds/dds_api.cpp')
-rw-r--r-- | source/blender/imbuf/intern/dds/dds_api.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index fba326f7865..71313d4438f 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -32,6 +32,10 @@ #include <stdio.h> // printf #include <fstream> +#if defined (WIN32) && !defined(FREE_WINDOWS) +#include "utfconv.h" +#endif + extern "C" { #include "imbuf.h" @@ -39,7 +43,6 @@ extern "C" { #include "IMB_imbuf.h" #include "IMB_allocimbuf.h" - int imb_save_dds(struct ImBuf * ibuf, const char *name, int flags) { return(0); /* todo: finish this function */ @@ -49,7 +52,15 @@ int imb_save_dds(struct ImBuf * ibuf, const char *name, int flags) if (ibuf->rect == 0) return (0); /* open file for writing */ - std::ofstream fildes(name); + std::ofstream fildes; + +#if defined (WIN32) && !defined(FREE_WINDOWS) + wchar_t *wname = alloc_utf16_from_8(name, 0); + fildes.open(wname); + free(wname); +#else + fildes.open(name); +#endif /* write header */ fildes << "DDS "; |