From 5fb20b3093d92c2b8fb264050963c90c62f39858 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 11 Jun 2019 02:14:59 -0400 Subject: [PATCH] video: fixed compiler warning on Visual Studio. --- src/video/SDL_vulkan_utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/SDL_vulkan_utils.c b/src/video/SDL_vulkan_utils.c index 6684e3b772928..fb63e0d3ff419 100644 --- a/src/video/SDL_vulkan_utils.c +++ b/src/video/SDL_vulkan_utils.c @@ -24,6 +24,8 @@ #include "SDL_error.h" #include "SDL_log.h" +/* !!! FIXME: this file doesn't match coding standards for SDL (brace position, etc). */ + #if SDL_VIDEO_VULKAN const char *SDL_Vulkan_GetResultString(VkResult result) @@ -274,7 +276,7 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_, SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "vulkandisplay: Number of display properties for device %u: %u", physicalDeviceIndex, displayPropertiesCount); - if (displayId < 0 || displayId >= displayPropertiesCount) + if ( (displayId < 0) || (((uint32_t) displayId) >= displayPropertiesCount) ) { /* Display id specified was higher than number of available displays, move to next physical device. */ displayId -= displayPropertiesCount;