Skip to content
Snippets Groups Projects
Commit 3a29c23c authored by Maxime Graulich's avatar Maxime Graulich
Browse files

Android does not have sysinfo

parent cff6b329
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
#if defined(__linux__) #if defined(__linux__) && !defined(BUILD_ANDROID)
#include <sys/sysinfo.h> #include <sys/sysinfo.h>
#endif #endif
...@@ -284,6 +284,8 @@ double TotalRam() ...@@ -284,6 +284,8 @@ double TotalRam()
status.dwLength = sizeof(status); status.dwLength = sizeof(status);
GlobalMemoryStatusEx(&status); GlobalMemoryStatusEx(&status);
ram = status.ullTotalPhys / ((double)1024 * 1024); ram = status.ullTotalPhys / ((double)1024 * 1024);
#elif defined(BUILD_ANDROID)
ram = 1024;
#elif defined(__linux__) #elif defined(__linux__)
struct sysinfo infos; struct sysinfo infos;
if(sysinfo(&infos) != -1) if(sysinfo(&infos) != -1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment