Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-08-22 17:10:37 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-08-22 17:10:37 +0400
commit61dddcb800963390b348c977d307bec3620a443a (patch)
tree32f9451d7c56e637f94bcee014f8872ea91e6c40 /source/blender/imbuf/intern/dds
parent10b983002f953f88ca84bc418d339a8096e3cef4 (diff)
Fix part of #32377: TIFF not saving on windows to paths with special characters,
and DDS should not be in the list of file types because we can only load those currently.
Diffstat (limited to 'source/blender/imbuf/intern/dds')
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp15
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..1aaeb4766e1 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>
+#ifdef WIN32
+#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;
+
+#ifdef WIN32
+ wchar_t *wname = alloc_utf16_from_8(name, 0);
+ fildes.open(wname);
+ free(wname);
+#else
+ fildes.open(name);
+#endif
/* write header */
fildes << "DDS ";