mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Renamed global struct and substructs.
Renamed _glfwLibrary to _glfw and made all substructs lower-case, making global variable names easier to read and type. Partially inspired by the internal naming conventions of glwt.
This commit is contained in:
+13
-13
@@ -45,15 +45,15 @@ void _glfwInitTimer(void)
|
||||
|
||||
if (QueryPerformanceFrequency((LARGE_INTEGER*) &freq))
|
||||
{
|
||||
_glfwLibrary.Win32.timer.hasPC = GL_TRUE;
|
||||
_glfwLibrary.Win32.timer.resolution = 1.0 / (double) freq;
|
||||
QueryPerformanceCounter((LARGE_INTEGER*) &_glfwLibrary.Win32.timer.t0_64);
|
||||
_glfw.win32.timer.hasPC = GL_TRUE;
|
||||
_glfw.win32.timer.resolution = 1.0 / (double) freq;
|
||||
QueryPerformanceCounter((LARGE_INTEGER*) &_glfw.win32.timer.t0_64);
|
||||
}
|
||||
else
|
||||
{
|
||||
_glfwLibrary.Win32.timer.hasPC = GL_FALSE;
|
||||
_glfwLibrary.Win32.timer.resolution = 0.001; // winmm resolution is 1 ms
|
||||
_glfwLibrary.Win32.timer.t0_32 = _glfw_timeGetTime();
|
||||
_glfw.win32.timer.hasPC = GL_FALSE;
|
||||
_glfw.win32.timer.resolution = 0.001; // winmm resolution is 1 ms
|
||||
_glfw.win32.timer.t0_32 = _glfw_timeGetTime();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,15 +71,15 @@ double _glfwPlatformGetTime(void)
|
||||
double t;
|
||||
__int64 t_64;
|
||||
|
||||
if (_glfwLibrary.Win32.timer.hasPC)
|
||||
if (_glfw.win32.timer.hasPC)
|
||||
{
|
||||
QueryPerformanceCounter((LARGE_INTEGER*) &t_64);
|
||||
t = (double)(t_64 - _glfwLibrary.Win32.timer.t0_64);
|
||||
t = (double)(t_64 - _glfw.win32.timer.t0_64);
|
||||
}
|
||||
else
|
||||
t = (double)(_glfw_timeGetTime() - _glfwLibrary.Win32.timer.t0_32);
|
||||
t = (double)(_glfw_timeGetTime() - _glfw.win32.timer.t0_32);
|
||||
|
||||
return t * _glfwLibrary.Win32.timer.resolution;
|
||||
return t * _glfw.win32.timer.resolution;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,12 +91,12 @@ void _glfwPlatformSetTime(double t)
|
||||
{
|
||||
__int64 t_64;
|
||||
|
||||
if (_glfwLibrary.Win32.timer.hasPC)
|
||||
if (_glfw.win32.timer.hasPC)
|
||||
{
|
||||
QueryPerformanceCounter((LARGE_INTEGER*) &t_64);
|
||||
_glfwLibrary.Win32.timer.t0_64 = t_64 - (__int64) (t / _glfwLibrary.Win32.timer.resolution);
|
||||
_glfw.win32.timer.t0_64 = t_64 - (__int64) (t / _glfw.win32.timer.resolution);
|
||||
}
|
||||
else
|
||||
_glfwLibrary.Win32.timer.t0_32 = _glfw_timeGetTime() - (int)(t * 1000.0);
|
||||
_glfw.win32.timer.t0_32 = _glfw_timeGetTime() - (int)(t * 1000.0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user