summaryrefslogtreecommitdiff
path: root/src/apm_driver.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-07-21 15:38:00 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-07-28 18:32:29 -0300
commit230858d8b3dfc18098cb89cdee3599714ac95375 (patch)
tree7b9d227b2146cb30b1a487f73cef6743196a40f3 /src/apm_driver.c
parent3cbb51c4a94b1d19cdc5b9542449281cc0952356 (diff)
Protect xf86rush dependent code around #ifdef XF86RUSH
Also correct an incorrect #ifndef -> #ifdef, so that the driver now doesn't have any calls to non existent symbols. Signed-off-by: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Diffstat (limited to 'src/apm_driver.c')
-rw-r--r--src/apm_driver.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/apm_driver.c b/src/apm_driver.c
index 49b74d3..9106d1f 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -53,9 +53,10 @@ static void ApmDisplayPowerManagementSet(ScrnInfoPtr pScrn,
int flags);
static void ApmProbeDDC(ScrnInfoPtr pScrn, int index);
-
+#ifdef XF86RUSH
int ApmPixmapIndex = -1;
static unsigned long ApmGeneration = 0;
+#endif
_X_EXPORT DriverRec APM = {
APM_VERSION,
@@ -1998,7 +1999,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
miSetPixmapDepths();
switch (pScrn->bitsPerPixel) {
-#ifndef HAVE_XF1BPP
+#ifdef HAVE_XF1BPP
case 1:
ret = xf1bppScreenInit(pScreen, FbBase,
pScrn->virtualX, pScrn->virtualY,
@@ -2120,6 +2121,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
}
+#ifdef XF86RUSH
if (ApmGeneration != serverGeneration) {
if ((ApmPixmapIndex = AllocatePixmapPrivateIndex()) < 0)
return FALSE;
@@ -2128,6 +2130,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (!AllocatePixmapPrivate(pScreen, ApmPixmapIndex, sizeof(ApmPixmapRec)))
return FALSE;
+#endif
/* Done */
return TRUE;