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:
+6
-6
@@ -55,8 +55,8 @@ void _glfwInitTimer(void)
|
||||
mach_timebase_info_data_t info;
|
||||
mach_timebase_info(&info);
|
||||
|
||||
_glfwLibrary.NS.timer.resolution = (double) info.numer / (info.denom * 1.0e9);
|
||||
_glfwLibrary.NS.timer.base = getRawTime();
|
||||
_glfw.ns.timer.resolution = (double) info.numer / (info.denom * 1.0e9);
|
||||
_glfw.ns.timer.base = getRawTime();
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ void _glfwInitTimer(void)
|
||||
|
||||
double _glfwPlatformGetTime(void)
|
||||
{
|
||||
return (double) (getRawTime() - _glfwLibrary.NS.timer.base) *
|
||||
_glfwLibrary.NS.timer.resolution;
|
||||
return (double) (getRawTime() - _glfw.ns.timer.base) *
|
||||
_glfw.ns.timer.resolution;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ double _glfwPlatformGetTime(void)
|
||||
|
||||
void _glfwPlatformSetTime(double time)
|
||||
{
|
||||
_glfwLibrary.NS.timer.base = getRawTime() -
|
||||
(uint64_t) (time / _glfwLibrary.NS.timer.resolution);
|
||||
_glfw.ns.timer.base = getRawTime() -
|
||||
(uint64_t) (time / _glfw.ns.timer.resolution);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user