summaryrefslogtreecommitdiff
path: root/src/vmware.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vmware.c')
-rw-r--r--src/vmware.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/vmware.c b/src/vmware.c
index e3892f1..41201f1 100644
--- a/src/vmware.c
+++ b/src/vmware.c
@@ -901,8 +901,8 @@ VMWAREModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool rebuildPixmap)
pScrn->pScreen->rootDepth),
(pointer)(pVMWARE->FbBase + pScrn->fbOffset));
- (*pScrn->EnableDisableFBAccess)(pScrn->pScreen->myNum, FALSE);
- (*pScrn->EnableDisableFBAccess)(pScrn->pScreen->myNum, TRUE);
+ (*pScrn->EnableDisableFBAccess)(XF86_SCRN_ARG(pScrn), FALSE);
+ (*pScrn->EnableDisableFBAccess)(XF86_SCRN_ARG(pScrn), TRUE);
}
vgaHWProtect(pScrn, FALSE);
@@ -1018,7 +1018,7 @@ vmwareNextXineramaState(VMWAREPtr pVMWARE)
}
static void
-VMWAREAdjustFrame(int scrnIndex, int x, int y, int flags)
+VMWAREAdjustFrame(ADJUST_FRAME_ARGS_DECL)
{
/* FIXME */
}
@@ -1089,9 +1089,9 @@ VMWAREStopFIFO(ScrnInfoPtr pScrn)
}
static Bool
-VMWARECloseScreen(int scrnIndex, ScreenPtr pScreen)
+VMWARECloseScreen(CLOSE_SCREEN_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
ScreenPtr save = &pVMWARE->ScrnFuncs;
@@ -1119,7 +1119,7 @@ VMWARECloseScreen(int scrnIndex, ScreenPtr pScreen)
pScrn->DriverFunc = NULL;
#endif
- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
}
static Bool
@@ -1296,16 +1296,14 @@ vmwareIsRegionEqual(const RegionPtr reg1,
}
static Bool
-VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+VMWAREScreenInit(SCREEN_INIT_ARGS_DECL)
{
- ScrnInfoPtr pScrn;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
vgaHWPtr hwp;
VMWAREPtr pVMWARE;
OptionInfoPtr options;
Bool useXinerama = TRUE;
- /* Get the ScrnInfoRec */
- pScrn = xf86Screens[pScreen->myNum];
pVMWARE = VMWAREPTR(pScrn);
@@ -1381,7 +1379,7 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
VMWAREModeInit(pScrn, pScrn->currentMode, FALSE);
/* Set the viewport if supported */
- VMWAREAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ VMWAREAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
/*
* Setup the screen's visuals, and initialise the framebuffer
@@ -1582,10 +1580,9 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
static Bool
-VMWARESwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
-
+VMWARESwitchMode(SWITCH_MODE_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
ScreenPtr pScreen = pScrn->pScreen;
pScreen->mmWidth = (pScreen->width * VMWARE_INCHTOMM +
@@ -1597,9 +1594,9 @@ VMWARESwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
}
static Bool
-VMWAREEnterVT(int scrnIndex, int flags)
+VMWAREEnterVT(VT_FUNC_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
/*
@@ -1616,9 +1613,9 @@ VMWAREEnterVT(int scrnIndex, int flags)
}
static void
-VMWARELeaveVT(int scrnIndex, int flags)
+VMWARELeaveVT(VT_FUNC_ARGS_DECL)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+ SCRN_INFO_PTR(arg);
VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
/*
@@ -1631,17 +1628,18 @@ VMWARELeaveVT(int scrnIndex, int flags)
}
static void
-VMWAREFreeScreen(int scrnIndex, int flags)
+VMWAREFreeScreen(FREE_SCREEN_ARGS_DECL)
{
+ SCRN_INFO_PTR(arg);
/*
* If the vgahw module is used vgaHWFreeHWRec() would be called
* here.
*/
- VMWAREFreeRec(xf86Screens[scrnIndex]);
+ VMWAREFreeRec(pScrn);
}
static ModeStatus
-VMWAREValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+VMWAREValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
{
return MODE_OK;
}