diff options
| author | RDR8 <[email protected]> | 2017-03-24 01:20:24 -0500 |
|---|---|---|
| committer | RDR8 <[email protected]> | 2017-03-24 01:20:24 -0500 |
| commit | 9875198a56263b5e282c016c67221ddfcfb51d31 (patch) | |
| tree | db361e29c361c657a4814b11351a4736de3d0c37 /src/physac.h | |
| parent | 6ba5217c28dd8b2bb29ce9ebb4660b5022cfbd1a (diff) | |
| download | raylib-9875198a56263b5e282c016c67221ddfcfb51d31.tar.gz raylib-9875198a56263b5e282c016c67221ddfcfb51d31.zip | |
c99 fix, some linux housekeeping
Diffstat (limited to 'src/physac.h')
| -rw-r--r-- | src/physac.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/physac.h b/src/physac.h index ff56615d..1aa0adee 100644 --- a/src/physac.h +++ b/src/physac.h @@ -249,7 +249,7 @@ PHYSACDEF void ClosePhysics(void); // Functions required to query time on Windows int __stdcall QueryPerformanceCounter(unsigned long long int *lpPerformanceCount); int __stdcall QueryPerformanceFrequency(unsigned long long int *lpFrequency); -#elif defined(__linux) || defined(PLATFORM_WEB) +#elif defined(__linux__) || defined(PLATFORM_WEB) #include <sys/time.h> // Required for: timespec #include <time.h> // Required for: clock_gettime() #include <stdint.h> @@ -277,7 +277,7 @@ PHYSACDEF void ClosePhysics(void); static unsigned int usedMemory = 0; // Total allocated dynamic memory static bool physicsThreadEnabled = false; // Physics thread enabled state static double currentTime = 0; // Current time in milliseconds -#if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(__linux) || defined(PLATFORM_WEB) +#if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(__linux__) || defined(PLATFORM_WEB) static double baseTime = 0; // Android and RPI platforms base time #endif static double startTime = 0; // Start time in milliseconds @@ -1906,7 +1906,7 @@ static double GetCurrentTime(void) time = (double)((double)currentTime/clockFrequency)*1000; #endif - #if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(__linux) || defined(PLATFORM_WEB) + #if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(__linux__) || defined(PLATFORM_WEB) struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); uint64_t temp = (uint64_t)ts.tv_sec*1000000000LLU + (uint64_t)ts.tv_nsec; |
