From 2faab6effc1ea280507962428a87b032b1237789 Mon Sep 17 00:00:00 2001 From: Joshua Simmons Date: Sun, 20 Nov 2022 00:14:49 +0100 Subject: [PATCH] Add function to retreive sdl header version --- ffi/sdl2-sys/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ffi/sdl2-sys/src/lib.rs b/ffi/sdl2-sys/src/lib.rs index 38f3fc5..5c0628d 100644 --- a/ffi/sdl2-sys/src/lib.rs +++ b/ffi/sdl2-sys/src/lib.rs @@ -1226,6 +1226,16 @@ pub struct Version { pub patch: u8, } +impl Version { + pub const fn current() -> Self { + Self { + major: MAJOR_VERSION, + minor: MINOR_VERSION, + patch: PATCH_VERSION, + } + } +} + #[repr(C)] pub enum SysWMType { UNKNOWN, -- 2.49.0