Make instance extension count unsigned

Fixes #714.
This commit is contained in:
Camilla Berglund 2016-02-22 10:44:37 +01:00
parent 2be2e0fa86
commit 7669ade19c
11 changed files with 12 additions and 12 deletions

View File

@ -127,7 +127,7 @@ To query the instance extensions required, call @ref
glfwGetRequiredInstanceExtensions. glfwGetRequiredInstanceExtensions.
@code @code
int count; unsigned int count;
const char** extensions = glfwGetRequiredInstanceExtensions(&count); const char** extensions = glfwGetRequiredInstanceExtensions(&count);
@endcode @endcode

View File

@ -3785,7 +3785,7 @@ GLFWAPI int glfwVulkanSupported(void);
* *
* @ingroup vulkan * @ingroup vulkan
*/ */
GLFWAPI const char** glfwGetRequiredInstanceExtensions(int* count); GLFWAPI const char** glfwGetRequiredInstanceExtensions(unsigned int* count);
#if defined(VK_VERSION_1_0) #if defined(VK_VERSION_1_0)

View File

@ -1339,7 +1339,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
return _glfw.ns.clipboardString; return _glfw.ns.clipboardString;
} }
char** _glfwPlatformGetRequiredInstanceExtensions(int* count) char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
{ {
*count = 0; *count = 0;
return NULL; return NULL;

View File

@ -438,7 +438,7 @@ struct _GLFWlibrary
GLFWbool available; GLFWbool available;
void* handle; void* handle;
char** extensions; char** extensions;
int extensionCount; unsigned int extensionCount;
PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties; PFN_vkEnumerateInstanceExtensionProperties EnumerateInstanceExtensionProperties;
PFN_vkGetInstanceProcAddr GetInstanceProcAddr; PFN_vkGetInstanceProcAddr GetInstanceProcAddr;
GLFWbool KHR_surface; GLFWbool KHR_surface;
@ -784,7 +784,7 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor);
/*! @ingroup platform /*! @ingroup platform
*/ */
char** _glfwPlatformGetRequiredInstanceExtensions(int* count); char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count);
/*! @ingroup platform /*! @ingroup platform
*/ */

View File

@ -719,7 +719,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
return NULL; return NULL;
} }
char** _glfwPlatformGetRequiredInstanceExtensions(int* count) char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
{ {
char** extensions; char** extensions;

View File

@ -196,7 +196,7 @@ GLFWAPI int glfwVulkanSupported(void)
return _glfw.vk.available; return _glfw.vk.available;
} }
GLFWAPI const char** glfwGetRequiredInstanceExtensions(int* count) GLFWAPI const char** glfwGetRequiredInstanceExtensions(unsigned int* count)
{ {
*count = 0; *count = 0;

View File

@ -1418,7 +1418,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
return _glfw.win32.clipboardString; return _glfw.win32.clipboardString;
} }
char** _glfwPlatformGetRequiredInstanceExtensions(int* count) char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
{ {
char** extensions; char** extensions;

View File

@ -710,7 +710,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
return NULL; return NULL;
} }
char** _glfwPlatformGetRequiredInstanceExtensions(int* count) char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
{ {
char** extensions; char** extensions;

View File

@ -2127,7 +2127,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
return _glfw.x11.clipboardString; return _glfw.x11.clipboardString;
} }
char** _glfwPlatformGetRequiredInstanceExtensions(int* count) char** _glfwPlatformGetRequiredInstanceExtensions(unsigned int* count)
{ {
char** extensions; char** extensions;

View File

@ -798,7 +798,7 @@ int main(int argc, char** argv)
PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices; PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices;
PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties; PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
re = glfwGetRequiredInstanceExtensions((int*) &re_count); re = glfwGetRequiredInstanceExtensions(&re_count);
printf("Vulkan required instance extensions:"); printf("Vulkan required instance extensions:");
for (i = 0; i < re_count; i++) for (i = 0; i < re_count; i++)

View File

@ -1732,7 +1732,7 @@ static void demo_init_vk(struct demo *demo) {
} }
/* Look for instance extensions */ /* Look for instance extensions */
required_extensions = glfwGetRequiredInstanceExtensions((int*) &required_extension_count); required_extensions = glfwGetRequiredInstanceExtensions(&required_extension_count);
if (!required_extensions) { if (!required_extensions) {
ERR_EXIT("glfwGetRequiredInstanceExtensions failed to find the " ERR_EXIT("glfwGetRequiredInstanceExtensions failed to find the "
"platform surface extensions.\n\nDo you have a compatible " "platform surface extensions.\n\nDo you have a compatible "