Fixed formatting, added actual count to SDL error message
authorSam Lantinga <slouken@libsdl.org>
Wed, 17 Jan 2018 13:12:39 -0800
changeset 11828da1ca77eb713
parent 11827 922c27f2fa56
child 11829 fcbafc9e443c
Fixed formatting, added actual count to SDL error message
src/video/SDL_vulkan_utils.c
     1.1 --- a/src/video/SDL_vulkan_utils.c	Sun Jan 14 13:34:50 2018 +0000
     1.2 +++ b/src/video/SDL_vulkan_utils.c	Wed Jan 17 13:12:39 2018 -0800
     1.3 @@ -152,18 +152,14 @@
     1.4                                                   unsigned nameCount,
     1.5                                                   const char *const *names)
     1.6  {
     1.7 -    if(userNames)
     1.8 -    {
     1.9 -		unsigned int i;
    1.10 +    if (userNames) {
    1.11 +        unsigned i;
    1.12  
    1.13 -        if(*userCount < nameCount)
    1.14 -        {
    1.15 -            SDL_SetError(
    1.16 -                "Ouput array for SDL_Vulkan_GetInstanceExtensions is too small");
    1.17 +        if (*userCount < nameCount) {
    1.18 +            SDL_SetError("Output array for SDL_Vulkan_GetInstanceExtensions needs to be at least %d big", nameCount);
    1.19              return SDL_FALSE;
    1.20          }
    1.21 -        for(i = 0; i < nameCount; i++)
    1.22 -        {
    1.23 +        for (i = 0; i < nameCount; i++) {
    1.24              userNames[i] = names[i];
    1.25          }
    1.26      }
    1.27 @@ -172,3 +168,5 @@
    1.28  }
    1.29  
    1.30  #endif
    1.31 +
    1.32 +/* vi: set ts=4 sw=4 expandtab: */