Merge pull request #1006 from sergio-nsk/sergio-nsk/uwp/1

prim: fix dev3 UWP build (#1005)
This commit is contained in:
Daan 2025-02-08 11:42:21 -08:00 committed by GitHub
commit 152804bb9f
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194

View file

@ -127,9 +127,11 @@ void _mi_prim_mem_init( mi_os_mem_config_t* config )
config->has_partial_free = false; config->has_partial_free = false;
config->has_virtual_reserve = true; config->has_virtual_reserve = true;
// windows version // windows version
const DWORD win_version = GetVersion(); OSVERSIONINFOW version{sizeof(version)};
win_major_version = (DWORD)(LOBYTE(LOWORD(win_version))); if (GetVersionExW(&version)) {
win_minor_version = (DWORD)(HIBYTE(LOWORD(win_version))); win_major_version = version.dwMajorVersion;
win_minor_version = version.dwMinorVersion;
}
// get the page size // get the page size
SYSTEM_INFO si; SYSTEM_INFO si;
GetSystemInfo(&si); GetSystemInfo(&si);