1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 07:07:25 -04:00

Shortened PC boolean name.

This commit is contained in:
Camilla Berglund 2012-09-02 15:21:40 +02:00
parent 733cd5372f
commit 52c27113d3
2 changed files with 5 additions and 5 deletions

View File

@ -191,7 +191,7 @@ typedef struct _GLFWlibraryWin32
// Timer data
struct {
GLboolean hasPerformanceCounter;
GLboolean hasPC;
double resolution;
unsigned int t0_32;
__int64 t0_64;

View File

@ -45,13 +45,13 @@ void _glfwInitTimer(void)
if (QueryPerformanceFrequency((LARGE_INTEGER*) &freq))
{
_glfwLibrary.Win32.timer.hasPerformanceCounter = GL_TRUE;
_glfwLibrary.Win32.timer.hasPC = GL_TRUE;
_glfwLibrary.Win32.timer.resolution = 1.0 / (double) freq;
QueryPerformanceCounter((LARGE_INTEGER*) &_glfwLibrary.Win32.timer.t0_64);
}
else
{
_glfwLibrary.Win32.timer.hasPerformanceCounter = GL_FALSE;
_glfwLibrary.Win32.timer.hasPC = GL_FALSE;
_glfwLibrary.Win32.timer.resolution = 0.001; // winmm resolution is 1 ms
_glfwLibrary.Win32.timer.t0_32 = _glfw_timeGetTime();
}
@ -71,7 +71,7 @@ double _glfwPlatformGetTime(void)
double t;
__int64 t_64;
if (_glfwLibrary.Win32.timer.hasPerformanceCounter)
if (_glfwLibrary.Win32.timer.hasPC)
{
QueryPerformanceCounter((LARGE_INTEGER*) &t_64);
t = (double)(t_64 - _glfwLibrary.Win32.timer.t0_64);
@ -91,7 +91,7 @@ void _glfwPlatformSetTime(double t)
{
__int64 t_64;
if (_glfwLibrary.Win32.timer.hasPerformanceCounter)
if (_glfwLibrary.Win32.timer.hasPC)
{
QueryPerformanceCounter((LARGE_INTEGER*) &t_64);
_glfwLibrary.Win32.timer.t0_64 = t_64 - (__int64) (t / _glfwLibrary.Win32.timer.resolution);