[vlc-devel] [PATCH 10/21] libvlc: use a union for exclusive video_direct3d_device_setup_t values

Steve Lhomme robux4 at ycbcr.xyz
Wed Feb 5 16:13:18 CET 2020


---
 include/vlc/libvlc_media_player.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index f7496829f0a..a52bb7143a7 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -700,8 +700,10 @@ typedef struct
 
 typedef struct
 {
-    void *device_context; /** ID3D11DeviceContext* for D3D11, IDirect3D9 * for D3D9 */
-    int  adapter;         /** Adapter to use with the IDirect3D9 for D3D9 */
+    union {
+        void *device_context; /** ID3D11DeviceContext* for D3D11, IDirect3D9 * for D3D9 */
+        int  adapter;         /** Adapter to use with the IDirect3D9 for D3D9 */
+    };
 } libvlc_video_direct3d_device_setup_t;
 
 /** Setup the rendering environment.
-- 
2.17.1



More information about the vlc-devel mailing list