quartz: Return increasing monitor GUID on VMR7 monitor enumeration

Michael Müller michael at fds-team.de
Mon Dec 30 20:53:41 CST 2013


This patch fixes a PlayReady DRM (Silverlight) failure on multi monitor
systems.

The current implementation of IVMR7MonitorConfig::GetAvailableMonitors()
sets the GUID pointer for each detected monitor to NULL. This is only
allowed for the default monitor and causes Silverlight to reject
playback in some cases.

To get rid of this problem, the patch changes the behavior, so that the
GUID for the first monitor is still set to NULL (we assume it's the
default monitor) while all other monitors get an increasing GUID
starting at 1. The GUID is currently ignored by all other
IVMR7MonitorConfig functions and therefore won't break the current
implementation.
-------------- next part --------------
From a1599a4f45a76a1c1d771e52660c0cdf7e6e19d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael at fds-team.de>
Date: Tue, 31 Dec 2013 03:23:19 +0100
Subject: quartz: Return increasing monitor GUID on VMR7 monitor enumeration

---
 dlls/quartz/vmr9.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index 31f3f8e..53e4942 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -1314,7 +1314,14 @@ static BOOL CALLBACK get_available_monitors_proc(HMONITOR hmon, HDC hdc, LPRECT
             VMRMONITORINFO *info = args->info7++;
             memset(info, 0, sizeof(*info));
 
-            info->guid.pGUID    = NULL; /* FIXME */
+            if (args->numdev > 0)
+            {
+                info->guid.pGUID = &info->guid.GUID;
+                info->guid.GUID.Data4[7] = args->numdev;
+            }
+            else
+                info->guid.pGUID = NULL;
+
             CopyRect(&info->rcMonitor, &mi.rcMonitor);
             info->hMon          = hmon;
             info->dwFlags       = mi.dwFlags;
-- 
1.8.3.2



More information about the wine-patches mailing list