[vlc-commits] commit: Fixed video display with directx and multiple monitors. ( Laurent Aimar )

git at videolan.org git at videolan.org
Wed Apr 28 00:49:27 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Apr 28 00:46:19 2010 +0200| [5ad6c0a52d095423a11fbc75e22491768f808cc6] | committer: Laurent Aimar 

Fixed video display with directx and multiple monitors.

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

 modules/video_output/msw/common.c  |    5 +++--
 modules/video_output/msw/directx.c |   10 +++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/msw/common.c b/modules/video_output/msw/common.c
index ebc814a..fc11a16 100644
--- a/modules/video_output/msw/common.c
+++ b/modules/video_output/msw/common.c
@@ -368,7 +368,7 @@ void UpdateRects(vout_display_t *vd,
     if (!IntersectRect(&rect_dest_clipped, &rect_dest,
                        &sys->rect_display)) {
         SetRectEmpty(&rect_src_clipped);
-        return;
+        goto exit;
     }
 
 #ifndef NDEBUG
@@ -389,7 +389,7 @@ void UpdateRects(vout_display_t *vd,
     if ((rect_dest_clipped.right - rect_dest_clipped.left) == 0 ||
         (rect_dest_clipped.bottom - rect_dest_clipped.top) == 0) {
         SetRectEmpty(&rect_src_clipped);
-        return;
+        goto exit;
     }
 
     /* src image dimensions */
@@ -444,6 +444,7 @@ void UpdateRects(vout_display_t *vd,
 
     CommonChangeThumbnailClip(vd, true);
 
+exit:
     /* Signal the change in size/position */
     sys->changes |= DX_POSITION_CHANGE;
 
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index 827c81b..e676b05 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -58,6 +58,10 @@
 
 #include "common.h"
 
+#ifdef UNICODE
+#   error "Unicode mode not supported"
+#endif
+
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -190,7 +194,7 @@ static int Open(vlc_object_t *object)
     HMODULE huser32 = GetModuleHandle(_T("USER32"));
     if (huser32) {
         sys->MonitorFromWindow = (void*)GetProcAddress(huser32, _T("MonitorFromWindow"));
-        sys->GetMonitorInfo = (void*)GetProcAddress(huser32, _T("GetMonitorInfoW"));
+        sys->GetMonitorInfo = (void*)GetProcAddress(huser32, _T("GetMonitorInfoA"));
     } else {
         sys->MonitorFromWindow = NULL;
         sys->GetMonitorInfo = NULL;
@@ -588,7 +592,7 @@ static int DirectXOpenDDraw(vout_display_t *vd)
     if (sys->MonitorFromWindow) {
         HRESULT (WINAPI *OurDirectDrawEnumerateEx)(LPDDENUMCALLBACKEXA, LPVOID, DWORD);
         OurDirectDrawEnumerateEx =
-          (void *)GetProcAddress(sys->hddraw_dll, _T("DirectDrawEnumerateExW"));
+          (void *)GetProcAddress(sys->hddraw_dll, _T("DirectDrawEnumerateExA"));
 
         if (OurDirectDrawEnumerateEx) {
             char *device = var_GetString(vd, "directx-device");
@@ -1486,7 +1490,7 @@ static int FindDevicesCallback(vlc_object_t *object, char const *name,
     /* Enumerate displays */
     HRESULT (WINAPI *OurDirectDrawEnumerateEx)(LPDDENUMCALLBACKEXA,
                                                LPVOID, DWORD) =
-        (void *)GetProcAddress(hddraw_dll, _T("DirectDrawEnumerateExW"));
+        (void *)GetProcAddress(hddraw_dll, _T("DirectDrawEnumerateExA"));
     if (OurDirectDrawEnumerateEx)
         OurDirectDrawEnumerateEx(DirectXEnumCallback2, item,
                                  DDENUM_ATTACHEDSECONDARYDEVICES);



More information about the vlc-commits mailing list