[vlc-commits] vout:wgl: do not use common.h

Steve Lhomme git at videolan.org
Mon Apr 1 16:50:01 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Apr  1 16:13:05 2019 +0200| [467b464d7f5d1a6034b292f835f2d386c8597775] | committer: Steve Lhomme

vout:wgl: do not use common.h

We are not using any "common" API here. We just need to store a HWND.

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

 modules/video_output/win32/wgl.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/modules/video_output/win32/wgl.c b/modules/video_output/win32/wgl.c
index fa4f466372..8f18424a8b 100644
--- a/modules/video_output/win32/wgl.c
+++ b/modules/video_output/win32/wgl.c
@@ -32,8 +32,6 @@
 #include <GL/glew.h>
 #include <GL/wglew.h>
 
-#include "common.h"
-
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -61,8 +59,7 @@ vlc_module_end()
 
 struct vout_display_sys_t
 {
-    vout_display_sys_win32_t sys;
-
+    HWND                  hvideownd;
     HDC                   hGLDC;
     HGLRC                 hGLRC;
     vlc_gl_t              *gl;
@@ -98,7 +95,7 @@ static void CreateGPUAffinityDC(vlc_gl_t *gl, UINT nVidiaAffinity) {
     PIXELFORMATDESCRIPTOR pfd = VLC_PFD_INITIALIZER;
 
     /* create a temporary GL context */
-    HDC winDC = GetDC(sys->sys.hvideownd);
+    HDC winDC = GetDC(sys->hvideownd);
     SetPixelFormat(winDC, ChoosePixelFormat(winDC, &pfd), &pfd);
     HGLRC hGLRC = wglCreateContext(winDC);
     wglMakeCurrent(winDC, hGLRC);
@@ -139,7 +136,7 @@ static void DestroyGPUAffinityDC(vlc_gl_t *gl) {
     PIXELFORMATDESCRIPTOR pfd = VLC_PFD_INITIALIZER;
 
     /* create a temporary GL context */
-    HDC winDC = GetDC(sys->sys.hvideownd);
+    HDC winDC = GetDC(sys->hvideownd);
     SetPixelFormat(winDC, ChoosePixelFormat(winDC, &pfd), &pfd);
     HGLRC hGLRC = wglCreateContext(winDC);
     wglMakeCurrent(winDC, hGLRC);
@@ -174,8 +171,8 @@ static int Open(vlc_gl_t *gl, unsigned width, unsigned height)
     if (wnd->type != VOUT_WINDOW_TYPE_HWND || wnd->handle.hwnd == 0)
         goto error;
 
-    sys->sys.hvideownd = wnd->handle.hwnd;
-    sys->hGLDC = GetDC(sys->sys.hvideownd);
+    sys->hvideownd = wnd->handle.hwnd;
+    sys->hGLDC = GetDC(sys->hvideownd);
     if (sys->hGLDC == NULL)
     {
         msg_Err(gl, "Could not get the device context");
@@ -257,7 +254,7 @@ static void Close(vlc_gl_t *gl)
     if (sys->hGLRC)
         wglDeleteContext(sys->hGLRC);
     if (sys->hGLDC)
-        ReleaseDC(sys->sys.hvideownd, sys->hGLDC);
+        ReleaseDC(sys->hvideownd, sys->hGLDC);
 
     DestroyGPUAffinityDC(gl);
 



More information about the vlc-commits mailing list