Commit 5ad6c0a5 authored by Laurent Aimar's avatar Laurent Aimar

Fixed video display with directx and multiple monitors.

parent ba394d11
...@@ -368,7 +368,7 @@ void UpdateRects(vout_display_t *vd, ...@@ -368,7 +368,7 @@ void UpdateRects(vout_display_t *vd,
if (!IntersectRect(&rect_dest_clipped, &rect_dest, if (!IntersectRect(&rect_dest_clipped, &rect_dest,
&sys->rect_display)) { &sys->rect_display)) {
SetRectEmpty(&rect_src_clipped); SetRectEmpty(&rect_src_clipped);
return; goto exit;
} }
#ifndef NDEBUG #ifndef NDEBUG
...@@ -389,7 +389,7 @@ void UpdateRects(vout_display_t *vd, ...@@ -389,7 +389,7 @@ void UpdateRects(vout_display_t *vd,
if ((rect_dest_clipped.right - rect_dest_clipped.left) == 0 || if ((rect_dest_clipped.right - rect_dest_clipped.left) == 0 ||
(rect_dest_clipped.bottom - rect_dest_clipped.top) == 0) { (rect_dest_clipped.bottom - rect_dest_clipped.top) == 0) {
SetRectEmpty(&rect_src_clipped); SetRectEmpty(&rect_src_clipped);
return; goto exit;
} }
/* src image dimensions */ /* src image dimensions */
...@@ -444,6 +444,7 @@ void UpdateRects(vout_display_t *vd, ...@@ -444,6 +444,7 @@ void UpdateRects(vout_display_t *vd,
CommonChangeThumbnailClip(vd, true); CommonChangeThumbnailClip(vd, true);
exit:
/* Signal the change in size/position */ /* Signal the change in size/position */
sys->changes |= DX_POSITION_CHANGE; sys->changes |= DX_POSITION_CHANGE;
......
...@@ -58,6 +58,10 @@ ...@@ -58,6 +58,10 @@
#include "common.h" #include "common.h"
#ifdef UNICODE
# error "Unicode mode not supported"
#endif
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
...@@ -190,7 +194,7 @@ static int Open(vlc_object_t *object) ...@@ -190,7 +194,7 @@ static int Open(vlc_object_t *object)
HMODULE huser32 = GetModuleHandle(_T("USER32")); HMODULE huser32 = GetModuleHandle(_T("USER32"));
if (huser32) { if (huser32) {
sys->MonitorFromWindow = (void*)GetProcAddress(huser32, _T("MonitorFromWindow")); sys->MonitorFromWindow = (void*)GetProcAddress(huser32, _T("MonitorFromWindow"));
sys->GetMonitorInfo = (void*)GetProcAddress(huser32, _T("GetMonitorInfoW")); sys->GetMonitorInfo = (void*)GetProcAddress(huser32, _T("GetMonitorInfoA"));
} else { } else {
sys->MonitorFromWindow = NULL; sys->MonitorFromWindow = NULL;
sys->GetMonitorInfo = NULL; sys->GetMonitorInfo = NULL;
...@@ -588,7 +592,7 @@ static int DirectXOpenDDraw(vout_display_t *vd) ...@@ -588,7 +592,7 @@ static int DirectXOpenDDraw(vout_display_t *vd)
if (sys->MonitorFromWindow) { if (sys->MonitorFromWindow) {
HRESULT (WINAPI *OurDirectDrawEnumerateEx)(LPDDENUMCALLBACKEXA, LPVOID, DWORD); HRESULT (WINAPI *OurDirectDrawEnumerateEx)(LPDDENUMCALLBACKEXA, LPVOID, DWORD);
OurDirectDrawEnumerateEx = OurDirectDrawEnumerateEx =
(void *)GetProcAddress(sys->hddraw_dll, _T("DirectDrawEnumerateExW")); (void *)GetProcAddress(sys->hddraw_dll, _T("DirectDrawEnumerateExA"));
if (OurDirectDrawEnumerateEx) { if (OurDirectDrawEnumerateEx) {
char *device = var_GetString(vd, "directx-device"); char *device = var_GetString(vd, "directx-device");
...@@ -1486,7 +1490,7 @@ static int FindDevicesCallback(vlc_object_t *object, char const *name, ...@@ -1486,7 +1490,7 @@ static int FindDevicesCallback(vlc_object_t *object, char const *name,
/* Enumerate displays */ /* Enumerate displays */
HRESULT (WINAPI *OurDirectDrawEnumerateEx)(LPDDENUMCALLBACKEXA, HRESULT (WINAPI *OurDirectDrawEnumerateEx)(LPDDENUMCALLBACKEXA,
LPVOID, DWORD) = LPVOID, DWORD) =
(void *)GetProcAddress(hddraw_dll, _T("DirectDrawEnumerateExW")); (void *)GetProcAddress(hddraw_dll, _T("DirectDrawEnumerateExA"));
if (OurDirectDrawEnumerateEx) if (OurDirectDrawEnumerateEx)
OurDirectDrawEnumerateEx(DirectXEnumCallback2, item, OurDirectDrawEnumerateEx(DirectXEnumCallback2, item,
DDENUM_ATTACHEDSECONDARYDEVICES); DDENUM_ATTACHEDSECONDARYDEVICES);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment