diff options
-rw-r--r-- | source/blender/blenlib/BLI_winstuff.h | 7 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index b66790f701f..e6ebd4935d9 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -36,6 +36,13 @@ #ifndef FREE_WINDOWS #pragma warning(once: 4761 4305 4244 4018) +#else +#ifdef WINVER +#undef WINVER +#endif + +/* Some stuff requires WINVER 0x500, but mingw's default is 0x400 */ +#define WINVER 0x0501 #endif #define WIN32_LEAN_AND_MEAN diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index f1f23928929..307e6514c71 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -32,8 +32,9 @@ #include <stdio.h> #include <stddef.h> #include <assert.h> + #ifdef WIN32 -#include <windows.h> +#include "BLI_winstuff.h" #include <io.h> #endif @@ -2036,7 +2037,7 @@ static void WM_OT_quit_blender(wmOperatorType *ot) } /* *********************** */ -#if defined(WIN32) && !defined(FREE_WINDOWS) +#if defined(WIN32) static int console= 1; void WM_toggle_console(bContext *C, short show) { @@ -3148,7 +3149,7 @@ void wm_operatortype_init(void) WM_operatortype_append(WM_OT_splash); WM_operatortype_append(WM_OT_search_menu); WM_operatortype_append(WM_OT_call_menu); -#if defined(WIN32) && !defined(FREE_WINDOWS) +#if defined(WIN32) WM_operatortype_append(WM_OT_toggle_console); #endif |