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,
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;
......
......@@ -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);
......
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