You've already forked godot
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user