mirror of
https://github.com/glfw/glfw.git
synced 2026-09-19 15:25:50 +00:00
@@ -28,6 +28,7 @@
|
||||
#include "internal.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <float.h>
|
||||
#if defined(_MSC_VER)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
@@ -591,6 +592,13 @@ GLFWAPI double glfwGetTime(void)
|
||||
GLFWAPI void glfwSetTime(double time)
|
||||
{
|
||||
_GLFW_REQUIRE_INIT();
|
||||
|
||||
if (time != time || time - DBL_MAX == time || time < 0.0)
|
||||
{
|
||||
_glfwInputError(GLFW_INVALID_VALUE, "Invalid time");
|
||||
return;
|
||||
}
|
||||
|
||||
_glfwPlatformSetTime(time);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user