| 4105 | #define NOT_A_VULKAN_WINDOW "The specified window isn't a Vulkan window" |
| 4106 | |
| 4107 | int SDL_Vulkan_LoadLibrary(const char *path) |
| 4108 | { |
| 4109 | int retval; |
| 4110 | if (!_this) { |
| 4111 | SDL_UninitializedVideo(); |
| 4112 | return -1; |
| 4113 | } |
| 4114 | if (_this->vulkan_config.loader_loaded) { |
| 4115 | if (path && SDL_strcmp(path, _this->vulkan_config.loader_path) != 0) { |
| 4116 | return SDL_SetError("Vulkan loader library already loaded"); |
| 4117 | } |
| 4118 | retval = 0; |
| 4119 | } else { |
| 4120 | if (!_this->Vulkan_LoadLibrary) { |
| 4121 | return SDL_SetError("Vulkan support is either not configured in SDL " |
| 4122 | "or not available in current SDL video driver " |
| 4123 | "(%s) or platform", _this->name); |
| 4124 | } |
| 4125 | retval = _this->Vulkan_LoadLibrary(_this, path); |
| 4126 | } |
| 4127 | if (retval == 0) { |
| 4128 | _this->vulkan_config.loader_loaded++; |
| 4129 | } |
| 4130 | return retval; |
| 4131 | } |
| 4132 | |
| 4133 | void *SDL_Vulkan_GetVkGetInstanceProcAddr(void) |
| 4134 | { |