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 78234ab3a5ee041d
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
     1.1 --- a/src/cpuinfo/SDL_cpuinfo.c	Thu Oct 17 11:32:14 2013 -0700
     1.2 +++ b/src/cpuinfo/SDL_cpuinfo.c	Thu Oct 17 11:56:33 2013 -0700
     1.3 @@ -621,7 +621,7 @@
     1.4  #ifdef HAVE_SYSCTLBYNAME
     1.5          if (SDL_SystemRAM <= 0) {
     1.6              int mib[2] = {CTL_HW, HW_MEMSIZE};
     1.7 -            uint64 memsize = 0;
     1.8 +            Uint64 memsize = 0;
     1.9              size_t len = sizeof(memsize);
    1.10              
    1.11              if (sysctl(mib, 2, &memsize, &len, NULL, 0) == 0) {
     2.1 --- a/test/testplatform.c	Thu Oct 17 11:32:14 2013 -0700
     2.2 +++ b/test/testplatform.c	Thu Oct 17 11:56:33 2013 -0700
     2.3 @@ -153,6 +153,7 @@
     2.4          SDL_Log("SSE3 %s\n", SDL_HasSSE3()? "detected" : "not detected");
     2.5          SDL_Log("SSE4.1 %s\n", SDL_HasSSE41()? "detected" : "not detected");
     2.6          SDL_Log("SSE4.2 %s\n", SDL_HasSSE42()? "detected" : "not detected");
     2.7 +        SDL_Log("System RAM %d MB\n", SDL_GetSystemRAM());
     2.8      }
     2.9      return (0);
    2.10  }