Added basic error reporting to shared code.

This commit is contained in:
Camilla Berglund
2010-09-09 21:34:42 +02:00
parent 2c091571d8
commit 922cd1011a
7 changed files with 222 additions and 16 deletions
+6
View File
@@ -42,7 +42,10 @@
GLFWAPI double glfwGetTime(void)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED);
return 0.0;
}
return _glfwPlatformGetTime();
}
@@ -55,7 +58,10 @@ GLFWAPI double glfwGetTime(void)
GLFWAPI void glfwSetTime(double time)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED);
return;
}
_glfwPlatformSetTime(time);
}