Skip to content

Commit

Permalink
video: fixed compiler warning on Visual Studio.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 11, 2019
1 parent 254eb67 commit 5fb20b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/SDL_vulkan_utils.c
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5fb20b3

Please sign in to comment.