From 3a29c23cd9c82a792ab8e2f20b4ce8edfb0ea684 Mon Sep 17 00:00:00 2001 From: Maxime Graulich <maxime.graulich@gmail.com> Date: Tue, 8 Apr 2014 12:03:41 +0000 Subject: [PATCH] Android does not have sysinfo --- Common/OS.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Common/OS.cpp b/Common/OS.cpp index a95d30e3ca..808b26b949 100644 --- a/Common/OS.cpp +++ b/Common/OS.cpp @@ -21,7 +21,7 @@ #include <sys/sysctl.h> #endif -#if defined(__linux__) +#if defined(__linux__) && !defined(BUILD_ANDROID) #include <sys/sysinfo.h> #endif @@ -284,6 +284,8 @@ double TotalRam() status.dwLength = sizeof(status); GlobalMemoryStatusEx(&status); ram = status.ullTotalPhys / ((double)1024 * 1024); +#elif defined(BUILD_ANDROID) + ram = 1024; #elif defined(__linux__) struct sysinfo infos; if(sysinfo(&infos) != -1) -- GitLab