From 9aeddb781a775696a8ba435db78ab9ddc5922ab0 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 29 Nov 2017 19:33:39 -0500 Subject: [PATCH] GlobalMemoryStatusEx only exists for 2000 and up --- frontend/drivers/platform_win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index 02ae1dd7d3..2988b75c4e 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -340,7 +340,7 @@ static uint64_t frontend_win32_get_mem_total(void) { /* OSes below 2000 don't have the Ex version, * and non-Ex cannot work with >4GB RAM */ -#if _WIN32_WINNT > 0x0400 +#if _WIN32_WINNT >= 0x0500 MEMORYSTATUSEX mem_info; mem_info.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&mem_info); @@ -357,7 +357,7 @@ static uint64_t frontend_win32_get_mem_used(void) { /* OSes below 2000 don't have the Ex version, * and non-Ex cannot work with >4GB RAM */ -#if _WIN32_WINNT > 0x0400 +#if _WIN32_WINNT >= 0x0500 MEMORYSTATUSEX mem_info; mem_info.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&mem_info);