[vlc-commits] vout:win32: pass the vout_window_t to EventThreadCreate

Steve Lhomme git at videolan.org
Tue Apr 2 16:32:43 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Mar 26 12:42:46 2019 +0100| [cebd2644f6fbe4c8fa0b1ff74bc8037702a6e3fc] | committer: Steve Lhomme

vout:win32: pass the vout_window_t to EventThreadCreate

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cebd2644f6fbe4c8fa0b1ff74bc8037702a6e3fc
---

 modules/video_output/win32/common.c | 2 +-
 modules/video_output/win32/events.c | 8 ++++----
 modules/video_output/win32/events.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 5c6f102c52..266b970217 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -98,7 +98,7 @@ int CommonInit(vout_display_t *vd, display_win32_area_t *area, vout_display_sys_
     var_Create(vd, "video-deco", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
 
     /* */
-    sys->event = EventThreadCreate(vd, &area->vdcfg);
+    sys->event = EventThreadCreate(vd, &area->vdcfg, area->vdcfg.window);
     if (!sys->event)
         return VLC_EGENERIC;
 
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index 3890787109..892c6af646 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -420,10 +420,10 @@ bool EventThreadGetAndResetSizeChanged( event_thread_t *p_event )
     return atomic_exchange(&p_event->size_changed, false);
 }
 
-event_thread_t *EventThreadCreate( vout_display_t *vd, const vout_display_cfg_t *vdcfg)
+event_thread_t *EventThreadCreate( vout_display_t *vd, const vout_display_cfg_t *vdcfg, vout_window_t *parent_window)
 {
-    if (vdcfg->window->type != VOUT_WINDOW_TYPE_HWND &&
-        !(vdcfg->window->type == VOUT_WINDOW_TYPE_DUMMY && vdcfg->window->handle.hwnd == 0))
+    if (parent_window->type != VOUT_WINDOW_TYPE_HWND &&
+        !(parent_window->type == VOUT_WINDOW_TYPE_DUMMY && parent_window->handle.hwnd == 0))
         return NULL;
      /* Create the Vout EventThread, this thread is created by us to isolate
      * the Win32 PeekMessage function calls. We want to do this because
@@ -441,7 +441,7 @@ event_thread_t *EventThreadCreate( vout_display_t *vd, const vout_display_cfg_t
     vlc_mutex_init( &p_event->lock );
     vlc_cond_init( &p_event->wait );
 
-    p_event->parent_window = vdcfg->window;
+    p_event->parent_window = parent_window;
 
     p_event->is_cursor_hidden = false;
     p_event->button_pressed = 0;
diff --git a/modules/video_output/win32/events.h b/modules/video_output/win32/events.h
index 453e0ac7d0..7df709479e 100644
--- a/modules/video_output/win32/events.h
+++ b/modules/video_output/win32/events.h
@@ -45,7 +45,7 @@ typedef struct {
     HWND hfswnd;
 } event_hwnd_t;
 
-event_thread_t *EventThreadCreate( vout_display_t *, const vout_display_cfg_t *);
+event_thread_t *EventThreadCreate( vout_display_t *, const vout_display_cfg_t *, vout_window_t *);
 void            EventThreadDestroy( event_thread_t * );
 int             EventThreadStart( event_thread_t *, event_hwnd_t *, const event_cfg_t * );
 void            EventThreadStop( event_thread_t * );



More information about the vlc-commits mailing list