Minor X11 library struct changes.

This commit is contained in:
Camilla Berglund
2010-09-09 20:25:33 +02:00
parent 8074209af4
commit 8a04910a45
4 changed files with 13 additions and 15 deletions
+4 -4
View File
@@ -40,11 +40,11 @@ void _glfwInitTimer(void)
struct timeval tv;
// "Resolution" is 1 us
_glfwLibrary.X11.Timer.resolution = 1e-6;
_glfwLibrary.X11.timer.resolution = 1e-6;
// Set start-time for timer
gettimeofday(&tv, NULL);
_glfwLibrary.X11.Timer.t0 = (long long) tv.tv_sec * (long long) 1000000 +
_glfwLibrary.X11.timer.t0 = (long long) tv.tv_sec * (long long) 1000000 +
(long long) tv.tv_usec;
}
@@ -66,7 +66,7 @@ double _glfwPlatformGetTime(void)
t = (long long) tv.tv_sec * (long long) 1000000 +
(long long) tv.tv_usec;
return (double)(t - _glfwLibrary.X11.Timer.t0) * _glfwLibrary.X11.Timer.resolution;
return (double)(t - _glfwLibrary.X11.timer.t0) * _glfwLibrary.X11.timer.resolution;
}
@@ -84,6 +84,6 @@ void _glfwPlatformSetTime(double t)
(long long) tv.tv_usec;
// Calulate new starting time
_glfwLibrary.X11.Timer.t0 = t0 - (long long)(t / _glfwLibrary.X11.Timer.resolution);
_glfwLibrary.X11.timer.t0 = t0 - (long long)(t / _glfwLibrary.X11.timer.resolution);
}