Build fix for win64 Qt GUI.

This commit is contained in:
harry 2023-05-21 16:56:52 -04:00
parent 1a3170fd68
commit 70aa850c15
2 changed files with 13 additions and 5 deletions

View File

@ -43,6 +43,15 @@ void timeStampRecord::readNew(void)
#endif
tsc = rdtsc();
}
#if defined(WIN32)
void timeStampRecord::qpcCalibrate(void)
{
if (QueryPerformanceFrequency((LARGE_INTEGER*)&timeStampRecord::qpcFreq) == 0)
{
printf("QueryPerformanceFrequency FAILED!\n");
}
}
#endif
class timeStampModule
{
@ -51,10 +60,7 @@ class timeStampModule
{
printf("timeStampModuleInit\n");
#if defined(WIN32)
if (QueryPerformanceFrequency((LARGE_INTEGER*)&timeStampRecord::qpcFreq) == 0)
{
printf("QueryPerformanceFrequency FAILED!\n");
}
timeStampRecord::qpcCalibrate();
#endif
}
};
@ -64,7 +70,7 @@ static timeStampModule module;
bool timeStampModuleInitialized(void)
{
#if defined(WIN32)
bool initialized = timeStampRecord::qpcFreq != 0;
bool initialized = timeStampRecord::countFreq() != 0;
#else
bool initialized = true;
#endif

View File

@ -346,6 +346,8 @@ namespace FCEU
{
return qpcFreq;
}
static void qpcCalibrate(void);
#endif
uint64_t getTSC(void){ return tsc; };