Fixed bug 3799 - SDL_CreateWindow fails with SDL_WINDOW_VULKAN (libvulkan.so.1 not found)
authorSam Lantinga <slouken@libsdl.org>
Wed, 06 Sep 2017 01:10:10 -0700
changeset 1145614800ea6ff4c
parent 11455 9e33d1be5d65
child 11457 3db9f2a42870
Fixed bug 3799 - SDL_CreateWindow fails with SDL_WINDOW_VULKAN (libvulkan.so.1 not found)

Manuel Sabogal

Android NDK defines Vulkan as libvulkan.so, not libvulkan.so.1. This is causing the program to not being able to create a window using SDL_WINDOW_VULKAN.

To fix this issue just change the line http://hg.libsdl.org/SDL/file/9e33d1be5d65/src/video/android/SDL_androidvulkan.c#l53 from "libvulkan.so.1" to "libvulkan.so"
src/video/android/SDL_androidvulkan.c
     1.1 --- a/src/video/android/SDL_androidvulkan.c	Tue Sep 05 16:15:54 2017 -0400
     1.2 +++ b/src/video/android/SDL_androidvulkan.c	Wed Sep 06 01:10:10 2017 -0700
     1.3 @@ -50,7 +50,7 @@
     1.4      if(!path)
     1.5          path = SDL_getenv("SDL_VULKAN_LIBRARY");
     1.6      if(!path)
     1.7 -        path = "libvulkan.so.1";
     1.8 +        path = "libvulkan.so";
     1.9      _this->vulkan_config.loader_handle = SDL_LoadObject(path);
    1.10      if(!_this->vulkan_config.loader_handle)
    1.11          return -1;