DPMS: Fix cast abuse
This commit is contained in:
parent
4da347adb1
commit
a99b0ab918
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -71,7 +70,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
|
|||
xcalloc(sizeof(DPMSRec), 1)))
|
||||
return FALSE;
|
||||
|
||||
pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
|
||||
pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
|
||||
pScrn->DPMSSet = set;
|
||||
pDPMS->Flags = flags;
|
||||
DPMSOpt = xf86FindOption(pScrn->options, "dpms");
|
||||
|
@ -112,7 +111,7 @@ DPMSClose(int i, ScreenPtr pScreen)
|
|||
if (DPMSKey == NULL)
|
||||
return FALSE;
|
||||
|
||||
pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
|
||||
pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
|
||||
|
||||
/* This shouldn't happen */
|
||||
if (!pDPMS)
|
||||
|
@ -130,7 +129,7 @@ DPMSClose(int i, ScreenPtr pScreen)
|
|||
xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
|
||||
}
|
||||
|
||||
xfree((pointer)pDPMS);
|
||||
xfree(pDPMS);
|
||||
dixSetPrivate(&pScreen->devPrivates, DPMSKey, NULL);
|
||||
if (--DPMSCount == 0)
|
||||
DPMSKey = NULL;
|
||||
|
@ -164,8 +163,7 @@ DPMSSet(ClientPtr client, int level)
|
|||
/* For each screen, set the DPMS level */
|
||||
for (i = 0; i < xf86NumScreens; i++) {
|
||||
pScrn = xf86Screens[i];
|
||||
pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates,
|
||||
DPMSKey);
|
||||
pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
|
||||
if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
|
||||
xf86EnableAccess(pScrn);
|
||||
pScrn->DPMSSet(pScrn, level, 0);
|
||||
|
@ -193,8 +191,7 @@ DPMSSupported(void)
|
|||
/* For each screen, check if DPMS is supported */
|
||||
for (i = 0; i < xf86NumScreens; i++) {
|
||||
pScrn = xf86Screens[i];
|
||||
pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates,
|
||||
DPMSKey);
|
||||
pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
|
||||
if (pDPMS && pScrn->DPMSSet)
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue