Replace GLFWuint64 with uint64_t

C99 stdint.h is provided by VS 2010 and later.  GLFW has not provided
testing or binaries for VS 2008 for several releases.

For earlier versions of VS there are third-party alternatives:

https://msinttypes.googlecode.com/svn/trunk/stdint.h
http://www.azillionmonkeys.com/qed/pstdint.h

This change does not affect the ABI.
This commit is contained in:
Camilla Berglund
2016-03-23 10:09:07 +01:00
parent 5eb2e83c82
commit 5661d03be8
12 changed files with 25 additions and 38 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ typedef struct _GLFWcursorNS
//
typedef struct _GLFWtimeNS
{
GLFWuint64 frequency;
uint64_t frequency;
} _GLFWtimeNS;
+2 -2
View File
@@ -48,12 +48,12 @@ void _glfwInitTimerNS(void)
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
GLFWuint64 _glfwPlatformGetTimerValue(void)
uint64_t _glfwPlatformGetTimerValue(void)
{
return mach_absolute_time();
}
GLFWuint64 _glfwPlatformGetTimerFrequency(void)
uint64_t _glfwPlatformGetTimerFrequency(void)
{
return _glfw.ns_time.frequency;
}
+3 -3
View File
@@ -660,16 +660,16 @@ GLFWAPI void glfwSetTime(double time)
}
_glfw.timerOffset = _glfwPlatformGetTimerValue() -
(GLFWuint64) (time * _glfwPlatformGetTimerFrequency());
(uint64_t) (time * _glfwPlatformGetTimerFrequency());
}
GLFWAPI GLFWuint64 glfwGetTimerValue(void)
GLFWAPI uint64_t glfwGetTimerValue(void)
{
_GLFW_REQUIRE_INIT_OR_RETURN(0);
return _glfwPlatformGetTimerValue();
}
GLFWAPI GLFWuint64 glfwGetTimerFrequency(void)
GLFWAPI uint64_t glfwGetTimerFrequency(void)
{
_GLFW_REQUIRE_INIT_OR_RETURN(0);
return _glfwPlatformGetTimerFrequency();
+4 -4
View File
@@ -91,7 +91,7 @@ typedef const GLubyte* (APIENTRY * PFNGLGETSTRINGIPROC)(GLenum,GLuint);
typedef void* VkInstance;
typedef void* VkPhysicalDevice;
typedef GLFWuint64 VkSurfaceKHR;
typedef uint64_t VkSurfaceKHR;
typedef unsigned int VkFlags;
typedef unsigned int VkBool32;
@@ -431,7 +431,7 @@ struct _GLFWlibrary
_GLFWmonitor** monitors;
int monitorCount;
GLFWuint64 timerOffset;
uint64_t timerOffset;
struct {
GLFWbool available;
@@ -600,12 +600,12 @@ const char* _glfwPlatformGetJoystickName(int joy);
/*! @copydoc glfwGetTimerValue
* @ingroup platform
*/
GLFWuint64 _glfwPlatformGetTimerValue(void);
uint64_t _glfwPlatformGetTimerValue(void);
/*! @copydoc glfwGetTimerFrequency
* @ingroup platform
*/
GLFWuint64 _glfwPlatformGetTimerFrequency(void);
uint64_t _glfwPlatformGetTimerFrequency(void);
/*! @ingroup platform
*/
+2 -2
View File
@@ -60,7 +60,7 @@ void _glfwInitTimerPOSIX(void)
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
GLFWuint64 _glfwPlatformGetTimerValue(void)
uint64_t _glfwPlatformGetTimerValue(void)
{
#if defined(CLOCK_MONOTONIC)
if (_glfw.posix_time.monotonic)
@@ -78,7 +78,7 @@ GLFWuint64 _glfwPlatformGetTimerValue(void)
}
}
GLFWuint64 _glfwPlatformGetTimerFrequency(void)
uint64_t _glfwPlatformGetTimerFrequency(void)
{
return _glfw.posix_time.frequency;
}
+1 -1
View File
@@ -38,7 +38,7 @@
typedef struct _GLFWtimePOSIX
{
GLFWbool monotonic;
GLFWuint64 frequency;
uint64_t frequency;
} _GLFWtimePOSIX;
+1 -1
View File
@@ -275,7 +275,7 @@ typedef struct _GLFWcursorWin32
typedef struct _GLFWtimeWin32
{
GLFWbool hasPC;
GLFWuint64 frequency;
uint64_t frequency;
} _GLFWtimeWin32;
+5 -5
View File
@@ -36,7 +36,7 @@
//
void _glfwInitTimerWin32(void)
{
GLFWuint64 frequency;
uint64_t frequency;
if (QueryPerformanceFrequency((LARGE_INTEGER*) &frequency))
{
@@ -55,19 +55,19 @@ void _glfwInitTimerWin32(void)
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
GLFWuint64 _glfwPlatformGetTimerValue(void)
uint64_t _glfwPlatformGetTimerValue(void)
{
if (_glfw.win32_time.hasPC)
{
GLFWuint64 value;
uint64_t value;
QueryPerformanceCounter((LARGE_INTEGER*) &value);
return value;
}
else
return (GLFWuint64) _glfw_timeGetTime();
return (uint64_t) _glfw_timeGetTime();
}
GLFWuint64 _glfwPlatformGetTimerFrequency(void)
uint64_t _glfwPlatformGetTimerFrequency(void)
{
return _glfw.win32_time.frequency;
}
+1 -1
View File
@@ -1763,7 +1763,7 @@ void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
if (!_glfwPlatformWindowVisible(window) &&
_glfw.x11.NET_REQUEST_FRAME_EXTENTS)
{
GLFWuint64 base;
uint64_t base;
XEvent event;
// Ensure _NET_FRAME_EXTENTS is set, allowing glfwGetWindowFrameSize to