diff options
author | Marcin Zawiejski <dragmz@gmail.com> | 2019-01-22 21:34:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-22 21:34:37 +0100 |
commit | 9ca649c67bab2f7765073f133c3354798f6c51ce (patch) | |
tree | 012ffcbf14f5b9aa8510e1d687c9f4b178d1d5ee /platform | |
parent | ab843b16984d8b62a1100d9b77d8b0dcdc4252bb (diff) |
Set WINVER and _WIN32_WINNT values in VS project
While looking into a different issue, I've noticed that Visual Studio Intellisense does not work well for Godot project when using Windows Vista+ APIs (e.g. CreateThreadpool), i.e. it does not recognise the APIs because they are defined in Windows header files for Vista+ only.
This is because the WINVER and _WIN32_WINNT symbols don't have their values set in the generated Godot project file. This fixes the problem by setting the values when generating the project file.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/detect.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 6736087d09..0662bc2edc 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -208,8 +208,8 @@ def configure_msvc(env, manual_msvc_config): 'RTAUDIO_ENABLED', 'WASAPI_ENABLED', 'WINMIDI_ENABLED', 'TYPED_METHOD_BIND', 'WIN32', 'MSVC', - 'WINVER=$target_win_version', - '_WIN32_WINNT=$target_win_version']) + 'WINVER=%s' % env["target_win_version"], + '_WIN32_WINNT=%s' % env["target_win_version"]]) env.AppendUnique(CPPDEFINES=['NOMINMAX']) # disable bogus min/max WinDef.h macros if env["bits"] == "64": env.AppendUnique(CPPDEFINES=['_WIN64']) |