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:
-rw-r--r--config/win32-mingw-config.py2
-rw-r--r--source/blender/src/usiblender.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py
index a5c59158bde..5d256300685 100644
--- a/config/win32-mingw-config.py
+++ b/config/win32-mingw-config.py
@@ -141,7 +141,7 @@ CC_WARN = [ '-Wall' ]
##FIX_STUBS_WARNINGS = -Wno-unused
-LLIBS = ['-lshfolder', '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread']
+LLIBS = ['-lshell32', '-lshfolder', '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c
index 68a1e08fcce..a638d003b63 100644
--- a/source/blender/src/usiblender.c
+++ b/source/blender/src/usiblender.c
@@ -38,7 +38,11 @@
#include <string.h>
#ifdef WIN32
-#include <shlobj.h> /* SHGetSpecialFolderPath, has to be done before BLI_winstuff for some reasons... */
+#include <windows.h> /* need to include windows.h so _WIN32_IE is defined */
+#ifndef _WIN32_IE
+#define _WIN32_IE 0x0400 /* minimal requirements for SHGetSpecialFolderPath on MINGW MSVC has this defined already */
+#endif
+#include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff because 'near' is disabled through BLI_windstuff */
#include "BLI_winstuff.h"
#include <process.h> /* getpid */
#else
@@ -530,9 +534,10 @@ static void readBlog(void)
/* Adding Desktop and My Documents */
fsmenu_append_seperator();
- SHGetFolderPath(0, CSIDL_PERSONAL,NULL, 0, folder);
+
+ SHGetSpecialFolderPath(0, folder, CSIDL_PERSONAL, 0);
fsmenu_insert_entry(folder, 0);
- SHGetFolderPath(0, CSIDL_DESKTOPDIRECTORY,NULL, 0, folder);
+ SHGetSpecialFolderPath(0, folder, CSIDL_DESKTOPDIRECTORY, 0);
fsmenu_insert_entry(folder, 0);
fsmenu_append_seperator();