From: Joshua Simmons Date: Sat, 19 Nov 2022 23:14:49 +0000 (+0100) Subject: Add function to retreive sdl header version X-Git-Url: https://git.nega.tv//gitweb.cgi?a=commitdiff_plain;h=2faab6effc1ea280507962428a87b032b1237789;p=josh%2Fnarcissus Add function to retreive sdl header version --- 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,