mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 09:08:58 +00:00
Added basic error reporting to shared code.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user