aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86xvmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86xvmc.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86xvmc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.c b/xorg-server/hw/xfree86/common/xf86xvmc.c
index 9cf36f526..5a7f69d8a 100644
--- a/xorg-server/hw/xfree86/common/xf86xvmc.c
+++ b/xorg-server/hw/xfree86/common/xf86xvmc.c
@@ -55,8 +55,8 @@ typedef struct {
XvMCAdaptorPtr dixinfo;
} xf86XvMCScreenRec, *xf86XvMCScreenPtr;
-static int XF86XvMCScreenKeyIndex;
-static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKeyIndex;
+static DevPrivateKeyRec XF86XvMCScreenKeyRec;
+#define XF86XvMCScreenKey (&XF86XvMCScreenKeyRec)
#define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey)
@@ -172,6 +172,9 @@ Bool xf86XvMCScreenInit(
if(!(pAdapt = malloc(sizeof(XvMCAdaptorRec) * num_adaptors)))
return FALSE;
+ if (!dixRegisterPrivateKey(&XF86XvMCScreenKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
if(!(pScreenPriv = malloc(sizeof(xf86XvMCScreenRec)))) {
free(pAdapt);
return FALSE;