Build fix for win64 Qt GUI.
This commit is contained in:
parent
1a3170fd68
commit
70aa850c15
|
@ -43,6 +43,15 @@ void timeStampRecord::readNew(void)
|
||||||
#endif
|
#endif
|
||||||
tsc = rdtsc();
|
tsc = rdtsc();
|
||||||
}
|
}
|
||||||
|
#if defined(WIN32)
|
||||||
|
void timeStampRecord::qpcCalibrate(void)
|
||||||
|
{
|
||||||
|
if (QueryPerformanceFrequency((LARGE_INTEGER*)&timeStampRecord::qpcFreq) == 0)
|
||||||
|
{
|
||||||
|
printf("QueryPerformanceFrequency FAILED!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
class timeStampModule
|
class timeStampModule
|
||||||
{
|
{
|
||||||
|
@ -51,10 +60,7 @@ class timeStampModule
|
||||||
{
|
{
|
||||||
printf("timeStampModuleInit\n");
|
printf("timeStampModuleInit\n");
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
if (QueryPerformanceFrequency((LARGE_INTEGER*)&timeStampRecord::qpcFreq) == 0)
|
timeStampRecord::qpcCalibrate();
|
||||||
{
|
|
||||||
printf("QueryPerformanceFrequency FAILED!\n");
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -64,7 +70,7 @@ static timeStampModule module;
|
||||||
bool timeStampModuleInitialized(void)
|
bool timeStampModuleInitialized(void)
|
||||||
{
|
{
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
bool initialized = timeStampRecord::qpcFreq != 0;
|
bool initialized = timeStampRecord::countFreq() != 0;
|
||||||
#else
|
#else
|
||||||
bool initialized = true;
|
bool initialized = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -346,6 +346,8 @@ namespace FCEU
|
||||||
{
|
{
|
||||||
return qpcFreq;
|
return qpcFreq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void qpcCalibrate(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint64_t getTSC(void){ return tsc; };
|
uint64_t getTSC(void){ return tsc; };
|
||||||
|
|
Loading…
Reference in New Issue