[vlc-devel] [PATCH 3/4] kva: replace deprecated APIs

KO Myung-Hun komh78 at gmail.com
Mon Dec 31 18:25:20 CET 2018


---
 modules/video_output/kva.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index f319ccee2e..8e657d5481 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -180,10 +180,9 @@ static void PMThread( void *arg )
 
     sys->b_fixt23 = var_CreateGetBool( vd, "kva-fixt23");
 
-    if( !sys->b_fixt23 )
+    if( !sys->b_fixt23 && vd->cfg->window->type == VOUT_WINDOW_TYPE_HWND )
         /* If an external window was specified, we'll draw in it. */
-        sys->parent_window =
-            vout_display_NewWindow( vd, VOUT_WINDOW_TYPE_HWND );
+        sys->parent_window = vd->cfg->window;
 
     if( sys->parent_window )
     {
@@ -968,7 +967,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
     {
         /* the user wants to close the window */
         case WM_CLOSE:
-            vout_display_SendEventClose(vd);
+            vout_window_ReportClose(vd->cfg->window);
             result = 0;
             break;
 
@@ -1071,7 +1070,7 @@ static MRESULT EXPENTRY WndProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
                     if( i_flags & KC_ALT )
                         i_key |= KEY_MODIFIER_ALT;
 
-                    vout_display_SendEventKey(vd, i_key);
+                    vout_window_ReportKeyPress(vd->cfg->window, i_key);
                 }
             }
             break;
-- 
2.13.3



More information about the vlc-devel mailing list