From 64e2a93d55fba6ca42412ece3d2c143479ed290c Mon Sep 17 00:00:00 2001 From: Keith Holman Date: Tue, 5 Dec 2017 17:43:37 -0800 Subject: [PATCH] Add bindings for the SDL_AUDIODEVICEADDED and SDL_AUDIODEVICEREMOVED events. --- src/SDL2.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/SDL2.cs b/src/SDL2.cs index a5c0ae0..2f5438f 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -3760,6 +3760,22 @@ namespace SDL2 */ } +// Ignore private members used for padding in this struct +#pragma warning disable 0169 + /* Audio device event (event.adevice.*) */ + [StructLayout(LayoutKind.Sequential)] + public struct SDL_AudioDeviceEvent + { + public UInt32 type; + public UInt32 timestamp; + public UInt32 which; + public byte iscapture; + private byte padding1; + private byte padding2; + private byte padding3; + } +#pragma warning restore 0169 + [StructLayout(LayoutKind.Sequential)] public struct SDL_TouchFingerEvent { @@ -3879,6 +3895,8 @@ namespace SDL2 [FieldOffset(0)] public SDL_ControllerDeviceEvent cdevice; [FieldOffset(0)] + public SDL_AudioDeviceEvent adevice; + [FieldOffset(0)] public SDL_QuitEvent quit; [FieldOffset(0)] public SDL_UserEvent user;