mirror of
https://github.com/X11Libre/xf86-video-vmware.git
synced 2026-03-24 01:24:37 +00:00
Lazily allocate the dynamic modes used for pixel precise guest resizing. They will not appear until they are neeed.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2006-09-03 Philip langdale <plangdale@vmware.com>
|
||||
|
||||
* src/vmware.c:
|
||||
* src/vmware.h:
|
||||
* src/vmwarectrl.c:
|
||||
Fix https://bugs.freedesktop.org/show_bug.cgi?id=8094
|
||||
Lazily allocate the dynamic modes used for pixel precise guest
|
||||
resizing. They will not appear until they are neeed.
|
||||
|
||||
2006-04-07 Adam Jackson <ajax@freedesktop.org>
|
||||
|
||||
* configure.ac:
|
||||
|
||||
11
src/vmware.c
11
src/vmware.c
@@ -1164,7 +1164,7 @@ VMWARELoadPalette(ScrnInfoPtr pScrn, int numColors, int* indices,
|
||||
}
|
||||
|
||||
|
||||
static DisplayModeRec *
|
||||
DisplayModeRec *
|
||||
VMWAREAddDisplayMode(ScrnInfoPtr pScrn,
|
||||
const char *name,
|
||||
int width,
|
||||
@@ -1414,8 +1414,13 @@ VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
* at ScreenInit time.
|
||||
*/
|
||||
pVMWARE->initialMode = pScrn->currentMode;
|
||||
pVMWARE->dynMode1 = VMWAREAddDisplayMode(pScrn, "DynMode1", 1, 1);
|
||||
pVMWARE->dynMode2 = VMWAREAddDisplayMode(pScrn, "DynMode2", 2, 2);
|
||||
|
||||
/*
|
||||
* We will lazily add the dynamic modes as the are needed when new
|
||||
* modes are requested through the control extension.
|
||||
*/
|
||||
pVMWARE->dynMode1 = NULL;
|
||||
pVMWARE->dynMode2 = NULL;
|
||||
|
||||
VMwareCtrl_ExtInit(pScrn);
|
||||
|
||||
|
||||
@@ -209,6 +209,13 @@ void vmwareSendSVGACmdUpdate(
|
||||
VMWAREPtr pVMWARE, BoxPtr pBB
|
||||
);
|
||||
|
||||
DisplayModeRec *VMWAREAddDisplayMode(
|
||||
ScrnInfoPtr pScrn,
|
||||
const char *name,
|
||||
int width,
|
||||
int height
|
||||
);
|
||||
|
||||
/* vmwarecurs.c */
|
||||
Bool vmwareCursorInit(
|
||||
ScreenPtr pScr
|
||||
|
||||
@@ -134,6 +134,13 @@ VMwareCtrlDoSetRes(ScrnInfoPtr pScrn,
|
||||
mode = pVMWARE->dynMode1;
|
||||
pVMWARE->dynMode1 = pVMWARE->dynMode2;
|
||||
pVMWARE->dynMode2 = mode;
|
||||
|
||||
/*
|
||||
* Initialise the dynamic mode if it hasn't been used before.
|
||||
*/
|
||||
if (!pVMWARE->dynMode1) {
|
||||
pVMWARE->dynMode1 = VMWAREAddDisplayMode(pScrn, "DynMode", 1, 1);
|
||||
}
|
||||
mode = pVMWARE->dynMode1;
|
||||
|
||||
mode->HDisplay = x;
|
||||
|
||||
Reference in New Issue
Block a user