Fixed compiling on Mac OS X, added a system RAM test
authorSam Lantinga <slouken@libsdl.org>
Thu, 17 Oct 2013 11:56:33 -0700
changeset 7823 4ab3a5ee041d
parent 7822 6bd98963606b
child 7824 286ab38ef766
Fixed compiling on Mac OS X, added a system RAM test
src/cpuinfo/SDL_cpuinfo.c
test/testplatform.c
--- a/src/cpuinfo/SDL_cpuinfo.c	Thu Oct 17 11:32:14 2013 -0700
+++ b/src/cpuinfo/SDL_cpuinfo.c	Thu Oct 17 11:56:33 2013 -0700
@@ -621,7 +621,7 @@
 #ifdef HAVE_SYSCTLBYNAME
         if (SDL_SystemRAM <= 0) {
             int mib[2] = {CTL_HW, HW_MEMSIZE};
-            uint64 memsize = 0;
+            Uint64 memsize = 0;
             size_t len = sizeof(memsize);
             
             if (sysctl(mib, 2, &memsize, &len, NULL, 0) == 0) {
--- a/test/testplatform.c	Thu Oct 17 11:32:14 2013 -0700
+++ b/test/testplatform.c	Thu Oct 17 11:56:33 2013 -0700
@@ -153,6 +153,7 @@
         SDL_Log("SSE3 %s\n", SDL_HasSSE3()? "detected" : "not detected");
         SDL_Log("SSE4.1 %s\n", SDL_HasSSE41()? "detected" : "not detected");
         SDL_Log("SSE4.2 %s\n", SDL_HasSSE42()? "detected" : "not detected");
+        SDL_Log("System RAM %d MB\n", SDL_GetSystemRAM());
     }
     return (0);
 }