-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fceux: add build patch for arm 2.6.6 release builds
relates to TASEmulators/fceux#663 Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
7f1cffa
commit cd40795
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
diff --git a/src/utils/timeStamp.cpp b/src/utils/timeStamp.cpp | ||
index f62d019f..efb45aac 100644 | ||
--- a/src/utils/timeStamp.cpp | ||
+++ b/src/utils/timeStamp.cpp | ||
@@ -14,6 +14,7 @@ | ||
//------------------------------------------------------------------------- | ||
//---- Time Stamp Record | ||
//------------------------------------------------------------------------- | ||
+#ifdef __FCEU_X86_TSC_ENABLE | ||
#if defined(WIN32) | ||
#include <intrin.h> | ||
#pragma intrinsic(__rdtsc) | ||
@@ -25,6 +26,7 @@ static uint64_t rdtsc() | ||
{ | ||
return __rdtsc(); | ||
} | ||
+#endif | ||
|
||
namespace FCEU | ||
{ | ||
@@ -36,12 +38,15 @@ uint64_t timeStampRecord::qpcFreq = 0; | ||
|
||
void timeStampRecord::readNew(void) | ||
{ | ||
-#if defined(__linux__) || defined(__APPLE__) || defined(__unix__) | ||
- clock_gettime( CLOCK_REALTIME, &ts ); | ||
-#else | ||
- QueryPerformanceCounter((LARGE_INTEGER*)&ts); | ||
-#endif | ||
- tsc = rdtsc(); | ||
+ #ifdef __FCEU_X86_TSC_ENABLE | ||
+ tsc = rdtsc(); | ||
+ #endif | ||
+ | ||
+ #if defined(__linux__) || defined(__APPLE__) || defined(__unix__) | ||
+ clock_gettime( CLOCK_REALTIME, &ts ); | ||
+ #else | ||
+ QueryPerformanceCounter((LARGE_INTEGER*)&ts); | ||
+ #endif | ||
} | ||
#if defined(WIN32) | ||
void timeStampRecord::qpcCalibrate(void) |