mirror of
https://github.com/encounter/SDL.git
synced 2025-12-20 10:25:28 +00:00
Fixed Android build with Vulkan support
This commit is contained in:
@@ -25,11 +25,19 @@
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#if defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
/* Vulkan isn't supported for the 'armeabi' NDK ABI, error in vk_platform.h */
|
||||
#undef SDL_VIDEO_VULKAN_SURFACE
|
||||
#define SDL_VIDEO_VULKAN_SURFACE 0
|
||||
#endif
|
||||
|
||||
#if defined(SDL_LOADSO_DISABLED)
|
||||
#undef SDL_VIDEO_VULKAN_SURFACE
|
||||
#define SDL_VIDEO_VULKAN_SURFACE 0
|
||||
#endif
|
||||
|
||||
#if SDL_VIDEO_VULKAN_SURFACE
|
||||
|
||||
#if SDL_VIDEO_DRIVER_ANDROID
|
||||
#define VK_USE_PLATFORM_ANDROID_KHR
|
||||
#endif
|
||||
@@ -58,7 +66,6 @@
|
||||
|
||||
#include "SDL_vulkan.h"
|
||||
|
||||
#if SDL_VIDEO_VULKAN_SURFACE
|
||||
|
||||
extern const char *SDL_Vulkan_GetResultString(VkResult result);
|
||||
|
||||
@@ -72,6 +79,12 @@ extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
|
||||
const char **userNames,
|
||||
unsigned nameCount,
|
||||
const char *const *names);
|
||||
|
||||
#else
|
||||
|
||||
/* No SDL Vulkan support, just include the header for typedefs */
|
||||
#include "SDL_vulkan.h"
|
||||
|
||||
#endif /* SDL_VIDEO_VULKAN_SURFACE */
|
||||
|
||||
#endif /* SDL_vulkan_internal_h_ */
|
||||
|
||||
Reference in New Issue
Block a user