diff --git a/Setup/src/Program.bf b/Setup/src/Program.bf index 3868731..5f75474 100644 --- a/Setup/src/Program.bf +++ b/Setup/src/Program.bf @@ -103,9 +103,10 @@ class SDL3Generator : Cpp2BeefGenerator, this(Span args) return; } case .TypedefDecl: - String prefix = scope .(64); var spelling = GetCursorSpelling!(cursor); + if (spelling.StartsWith("Vk")) return; + String prefix = scope .(64); if (spelling == "SDL_Keycode") prefix.Set("SDLK_"); else @@ -225,6 +226,9 @@ class SDL3Generator : Cpp2BeefGenerator, this(Span args) } FixCurly(); return; + case .StructDecl: + var spelling = GetCursorSpelling!(cursor); + if (spelling.StartsWith("Vk")) return; default: } base.HandleCursor(cursor); diff --git a/src/Library.bf b/src/Library.bf index 7a954ad..a817ad8 100644 --- a/src/Library.bf +++ b/src/Library.bf @@ -11,6 +11,11 @@ static class SDL typealias CrcUint32 = Uint32; typealias CrcUint8 = Uint8; + public typealias VkInstance = int; + public typealias VkSurfaceKHR = uint64; + public typealias VkPhysicalDevice = int; + public struct VkAllocationCallbacks; + [OnCompile(.TypeDone)] private static void Build() { diff --git a/src/SDL_vulkan.bf b/src/SDL_vulkan.bf index d180c3a..aac9154 100644 --- a/src/SDL_vulkan.bf +++ b/src/SDL_vulkan.bf @@ -74,10 +74,10 @@ extension SDL -[CRepr] public struct VkInstance_T;public typealias VkInstance = VkInstance_T*; -[CRepr] public struct VkPhysicalDevice_T;public typealias VkPhysicalDevice = VkPhysicalDevice_T*; -[CRepr] public struct VkSurfaceKHR_T;public typealias VkSurfaceKHR = VkSurfaceKHR_T*; -[CRepr] public struct VkAllocationCallbacks; + + + + /* Make sure to undef to avoid issues in case of later vulkan include */