diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-05 09:55:41 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-05 09:55:41 +0100 |
commit | 5d20628c31d7434fe0380ac5210bdad9dd935793 (patch) | |
tree | b3c1cd4390348ac801b5056027d9d751d77c4d78 /platform/windows | |
parent | 9e13b90ce86a0942415e6ecaa6db9d058a673472 (diff) | |
parent | f4ca6a856ac589e4de485325e8c4e41d544817e2 (diff) | |
download | redot-engine-5d20628c31d7434fe0380ac5210bdad9dd935793.tar.gz |
Merge pull request #88496 from bruvzg/d3d12_dyn_load
[Windows] Make D3D12 loading dynamic to support pre-Windows 10 versions.
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/detect.py | 12 | ||||
-rw-r--r-- | platform/windows/display_server_windows.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index ca81bb615e..b9a772cf48 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -437,6 +437,10 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config): else: print("Missing environment variable: WindowsSdkDir") + if int(env["target_win_version"], 16) < 0x0601: + print("`target_win_version` should be 0x0601 or higher (Windows 7).") + sys.exit(255) + env.AppendUnique( CPPDEFINES=[ "WINDOWS_ENABLED", @@ -501,7 +505,7 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config): sys.exit(255) env.AppendUnique(CPPDEFINES=["D3D12_ENABLED", "RD_ENABLED"]) - LIBS += ["d3d12", "dxgi", "dxguid"] + LIBS += ["dxgi", "dxguid"] LIBS += ["version"] # Mesa dependency. # Needed for avoiding C1128. @@ -666,6 +670,10 @@ def configure_mingw(env: "SConsEnvironment"): ## Compile flags + if int(env["target_win_version"], 16) < 0x0601: + print("`target_win_version` should be 0x0601 or higher (Windows 7).") + sys.exit(255) + if not env["use_llvm"]: env.Append(CCFLAGS=["-mwindows"]) @@ -726,7 +734,7 @@ def configure_mingw(env: "SConsEnvironment"): sys.exit(255) env.AppendUnique(CPPDEFINES=["D3D12_ENABLED", "RD_ENABLED"]) - env.Append(LIBS=["d3d12", "dxgi", "dxguid"]) + env.Append(LIBS=["dxgi", "dxguid"]) # PIX if not env["arch"] in ["x86_64", "arm64"] or env["pix_path"] == "" or not os.path.exists(env["pix_path"]): diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index 81cddec49f..052331a45f 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -192,6 +192,7 @@ typedef UINT32 PEN_MASK; #define POINTER_MESSAGE_FLAG_FIRSTBUTTON 0x00000010 #endif +#if WINVER < 0x0602 enum tagPOINTER_INPUT_TYPE { PT_POINTER = 0x00000001, PT_TOUCH = 0x00000002, @@ -242,6 +243,7 @@ typedef struct tagPOINTER_PEN_INFO { INT32 tiltX; INT32 tiltY; } POINTER_PEN_INFO; +#endif #endif //POINTER_STRUCTURES |