1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

[Windows] Fix LLVM MinGW build.

This commit is contained in:
bruvzg
2022-10-06 09:30:25 +03:00
parent ea9bb98f26
commit 6afb2d0225
3 changed files with 9 additions and 8 deletions

View File

@@ -295,11 +295,12 @@ String OS_Windows::get_distribution_name() const {
}
String OS_Windows::get_version() const {
typedef LONG NTSTATUS, *PNTSTATUS;
typedef LONG NTSTATUS;
typedef NTSTATUS(WINAPI * RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
RtlGetVersionPtr version_ptr = (RtlGetVersionPtr)GetProcAddress(GetModuleHandle("ntdll.dll"), "RtlGetVersion");
if (version_ptr != nullptr) {
RTL_OSVERSIONINFOW fow = { 0 };
RTL_OSVERSIONINFOW fow;
ZeroMemory(&fow, sizeof(fow));
fow.dwOSVersionInfoSize = sizeof(fow);
if (version_ptr(&fow) == 0x00000000) {
return vformat("%d.%d.%d", (int64_t)fow.dwMajorVersion, (int64_t)fow.dwMinorVersion, (int64_t)fow.dwBuildNumber);